{"_id":"mime-match","_rev":"2783734","name":"mime-match","description":"A simple function to check whether a mimetype matches the specified mimetype (with wildcard support)","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"time":{"modified":"2022-06-13T06:10:13.000Z","created":"2015-02-09T04:18:55.452Z","1.0.2":"2016-06-09T03:35:33.959Z","1.0.0":"2015-02-09T04:18:55.452Z"},"users":{},"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/DamonOehlman/mime-match.git"},"versions":{"1.0.2":{"name":"mime-match","version":"1.0.2","description":"A simple function to check whether a mimetype matches the specified mimetype (with wildcard support)","main":"index.js","scripts":{"test":"node test.js","gendocs":"gendocs > README.md"},"repository":{"type":"git","url":"git+https://github.com/DamonOehlman/mime-match.git"},"keywords":["mime","wildcard"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/DamonOehlman/mime-match/issues"},"homepage":"https://github.com/DamonOehlman/mime-match","dependencies":{"wildcard":"^1.1.0"},"devDependencies":{"tape":"^4.5.1"},"gitHead":"6299160272c42c3d26e56ddc444567cb985908f2","_id":"mime-match@1.0.2","_shasum":"3f87c31e9af1a5fd485fb9db134428b23bbb7ba8","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"dist":{"shasum":"3f87c31e9af1a5fd485fb9db134428b23bbb7ba8","size":2019,"noattachment":false,"key":"/mime-match/-/mime-match-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/mime-match/download/mime-match-1.0.2.tgz"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mime-match-1.0.2.tgz_1465443330739_0.9881193591281772"},"directories":{},"publish_time":1465443333959,"_hasShrinkwrap":false,"_cnpm_publish_time":1465443333959,"_cnpmcore_publish_time":"2021-12-17T00:06:12.196Z"},"1.0.0":{"name":"mime-match","version":"1.0.0","description":"A simple function to check whether a mimetype matches the specified mimetype (with wildcard support)","main":"index.js","scripts":{"test":"node test.js","gendocs":"gendocs > README.md"},"repository":{"type":"git","url":"https://github.com/DamonOehlman/mime-match.git"},"keywords":["mime","wildcard"],"author":{"name":"Damon Oehlman","email":"damon.oehlman@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/DamonOehlman/mime-match/issues"},"homepage":"https://github.com/DamonOehlman/mime-match","dependencies":{"wildcard":"^1.1.0"},"devDependencies":{"tape":"^3.5.0"},"gitHead":"7360d3d16414c6add55bad1db4ed87916c620009","_id":"mime-match@1.0.0","_shasum":"94e5be5e78107ddede65cdc6a19b7f16c2703419","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"damonoehlman","email":"damon.oehlman@gmail.com"},"maintainers":[{"name":"damonoehlman","email":"damon.oehlman@gmail.com"}],"dist":{"shasum":"94e5be5e78107ddede65cdc6a19b7f16c2703419","size":1911,"noattachment":false,"key":"/mime-match/-/mime-match-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mime-match/download/mime-match-1.0.0.tgz"},"directories":{},"publish_time":1423455535452,"_hasShrinkwrap":false,"_cnpm_publish_time":1423455535452,"_cnpmcore_publish_time":"2021-12-17T00:06:12.397Z"}},"readme":"# mime-match\n\nA simple function to checker whether a target mime type matches a mime-type\npattern (e.g. image/jpeg matches image/jpeg OR image/*).\n\n\n[![NPM](https://nodei.co/npm/mime-match.png)](https://nodei.co/npm/mime-match/)\n\n[![Build Status](https://api.travis-ci.org/DamonOehlman/mime-match.svg?branch=master)](https://travis-ci.org/DamonOehlman/mime-match) [![bitHound Score](https://www.bithound.io/github/DamonOehlman/mime-match/badges/score.svg)](https://www.bithound.io/github/DamonOehlman/mime-match) \n\n## Example Usage\n\n```js\nvar match = require('mime-match/');\n\n// exact match\nconsole.log(match('image/jpeg', 'image/jpeg'));\n// --> true\n\n// wildcard match\nconsole.log(match('image/jpeg', 'image/*'));\n// --> true\n\n// find which of our wildcard patterns matches a specific mimetype\nconsole.log(['application/*', 'image/*'].filter(match('image/jpeg')));\n// --> ['image/*']\n\n// charset suffix is ignored\nconsole.log(match('application/json', 'application/json; charset=utf-8'));\n// --> true\n\n```\n\n## License(s)\n\n### ISC\n\nCopyright (c) 2016, Damon Oehlman <damon.oehlman@gmail.com>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n","_attachments":{},"homepage":"https://github.com/DamonOehlman/mime-match","bugs":{"url":"https://github.com/DamonOehlman/mime-match/issues"},"license":"ISC"}