{"_id":"ext-name","_rev":"12819","name":"ext-name","description":"Get the file extension and MIME type from a file","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"kevva","email":""}],"time":{"modified":"2021-06-03T09:58:16.000Z","created":"2014-08-31T16:45:44.088Z","5.0.0":"2017-06-07T16:11:27.288Z","4.1.0":"2017-05-22T15:08:22.703Z","4.0.0":"2016-05-21T16:19:28.775Z","3.0.0":"2015-04-09T16:39:39.774Z","2.2.0":"2015-04-09T16:38:19.510Z","2.0.2":"2014-11-02T19:24:30.112Z","2.0.1":"2014-10-28T11:14:30.074Z","2.0.0":"2014-10-24T16:57:00.743Z","1.0.1":"2014-08-31T16:45:44.088Z"},"users":{"raycharles":true,"faraoman":true},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"repository":{"type":"git","url":"git+https://github.com/kevva/ext-name.git"},"versions":{"5.0.0":{"name":"ext-name","version":"5.0.0","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/ext-name.git"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ext-list":"^2.0.0","sort-keys-length":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"4d84e68c9876d1d0933bd832f60d84ed1eeac9da","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name#readme","_id":"ext-name@5.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"70781981d183ee15d13993c8822045c506c8f0a6","size":1750,"noattachment":false,"key":"/ext-name/-/ext-name-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-5.0.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ext-name-5.0.0.tgz_1496851886409_0.42046912061050534"},"directories":{},"publish_time":1496851887288,"_cnpm_publish_time":1496851887288,"_hasShrinkwrap":false},"4.1.0":{"name":"ext-name","version":"4.1.0","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/ext-name.git"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ext-list":"^2.0.0","sort-keys-length":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"d3c52338ad9ba2320044cfaed14f1c673296c192","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name#readme","_id":"ext-name@4.1.0","_shasum":"4b211719e6089230b91e8892c3179f5cafe6b167","_from":".","_npmVersion":"4.6.1","_nodeVersion":"4.5.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"4b211719e6089230b91e8892c3179f5cafe6b167","size":1702,"noattachment":false,"key":"/ext-name/-/ext-name-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-4.1.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ext-name-4.1.0.tgz_1495465701721_0.4407489411532879"},"directories":{},"publish_time":1495465702703,"_hasShrinkwrap":false,"_cnpm_publish_time":1495465702703},"4.0.0":{"name":"ext-name","version":"4.0.0","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/ext-name.git"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ends-with":"^0.2.0","ext-list":"^2.0.0","sort-keys-length":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"c50c3b8b20fc0262e045314e5bda37346664a987","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name#readme","_id":"ext-name@4.0.0","_shasum":"fe1895e2360ab3c0a52033c7bbc259a8402c3951","_from":".","_npmVersion":"3.8.8","_nodeVersion":"5.11.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"fe1895e2360ab3c0a52033c7bbc259a8402c3951","size":1649,"noattachment":false,"key":"/ext-name/-/ext-name-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-4.0.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ext-name-4.0.0.tgz_1463847567748_0.1132276114076376"},"directories":{},"publish_time":1463847568775,"_cnpm_publish_time":1463847568775,"_hasShrinkwrap":false},"3.0.0":{"name":"ext-name","version":"3.0.0","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/ext-name"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"ext-name":"cli.js"},"scripts":{"test":"node test.js"},"files":["cli.js","index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ends-with":"^0.2.0","ext-list":"^2.0.0","meow":"^3.1.0","sort-keys-length":"^1.0.0"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"5c636230352126f78cc317b5c07196724a7e5151","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name","_id":"ext-name@3.0.0","_shasum":"07e4418737cb1f513c32c6ea48d8b8c8e0471abb","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"07e4418737cb1f513c32c6ea48d8b8c8e0471abb","size":1840,"noattachment":false,"key":"/ext-name/-/ext-name-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-3.0.0.tgz"},"directories":{},"publish_time":1428597579774,"_cnpm_publish_time":1428597579774,"_hasShrinkwrap":false},"2.2.0":{"name":"ext-name","version":"2.2.0","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/ext-name"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"extname":"cli.js"},"scripts":{"test":"node test.js"},"files":["cli.js","index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ends-with":"^0.2.0","ext-list":"^2.0.0","meow":"^3.1.0","sort-keys-length":"^1.0.0"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"638575f59c4ebe45617460042b77450a0613f017","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name","_id":"ext-name@2.2.0","_shasum":"2d879028caf8412c415e30e0ba75699252e80f35","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"2d879028caf8412c415e30e0ba75699252e80f35","size":1834,"noattachment":false,"key":"/ext-name/-/ext-name-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-2.2.0.tgz"},"directories":{},"publish_time":1428597499510,"_cnpm_publish_time":1428597499510,"_hasShrinkwrap":false},"2.0.2":{"name":"ext-name","version":"2.0.2","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/ext-name"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"extname":"cli.js"},"scripts":{"test":"node test.js"},"files":["cli.js","index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ext-list":"^2.0.0","meow":"^2.0.0","underscore.string":"~2.3.3"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"e7be7c9ca3e3d1ecd57a1047df18bb65e58f911c","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name","_id":"ext-name@2.0.2","_shasum":"478b76e2b241b03665f2ad389ea1d724bb553019","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.32","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"478b76e2b241b03665f2ad389ea1d724bb553019","size":1947,"noattachment":false,"key":"/ext-name/-/ext-name-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-2.0.2.tgz"},"directories":{},"publish_time":1414956270112,"_cnpm_publish_time":1414956270112,"_hasShrinkwrap":false},"2.0.1":{"name":"ext-name","version":"2.0.1","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/ext-name"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"extname":"cli.js"},"scripts":{"test":"node test.js"},"files":["cli.js","index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ext-list":"^2.0.0","meow":"^2.0.0","underscore.string":"~2.3.3"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"dd4bcad770d9c8ce9677fdb92b530c22570501a8","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name","_id":"ext-name@2.0.1","_shasum":"8c471a909e78ee1a4f0b9a0a676426d80b258510","_from":".","_npmVersion":"2.1.5","_nodeVersion":"0.10.32","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"8c471a909e78ee1a4f0b9a0a676426d80b258510","size":1261,"noattachment":false,"key":"/ext-name/-/ext-name-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-2.0.1.tgz"},"directories":{},"publish_time":1414494870074,"_cnpm_publish_time":1414494870074,"_hasShrinkwrap":false},"2.0.0":{"name":"ext-name","version":"2.0.0","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/ext-name"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"extname":"cli.js"},"scripts":{"test":"node test.js"},"files":["cli.js","index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ext-list":"^2.0.0","meow":"^2.0.0","underscore.string":"~2.3.3"},"devDependencies":{"ava":"^0.0.4"},"gitHead":"070b92f4c55f363c9533338ee83ffd94eb929746","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name","_id":"ext-name@2.0.0","_shasum":"8bdcead6be83db084df493740baa9e81edc6fd1b","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"8bdcead6be83db084df493740baa9e81edc6fd1b","size":1278,"noattachment":false,"key":"/ext-name/-/ext-name-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-2.0.0.tgz"},"directories":{},"publish_time":1414169820743,"_cnpm_publish_time":1414169820743,"_hasShrinkwrap":false},"1.0.1":{"name":"ext-name","version":"1.0.1","description":"Get the file extension and MIME type from a file","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/ext-name"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"extname":"cli.js"},"scripts":{"test":"node test.js"},"files":["cli.js","index.js"],"keywords":["ext","extname","mime"],"dependencies":{"ext-list":"^0.2.0","underscore.string":"~2.3.3"},"devDependencies":{"ava":"0.0.4"},"gitHead":"4d91aca71fe9ce34fb8a287100297809b0de17cd","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"homepage":"https://github.com/kevva/ext-name","_id":"ext-name@1.0.1","_shasum":"18283356dc40a393455c54460f0599ce97d30e0c","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":""}],"dist":{"shasum":"18283356dc40a393455c54460f0599ce97d30e0c","size":1371,"noattachment":false,"key":"/ext-name/-/ext-name-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ext-name/download/ext-name-1.0.1.tgz"},"directories":{},"publish_time":1409503544088,"_cnpm_publish_time":1409503544088,"_hasShrinkwrap":false}},"readme":"# ext-name [![Build Status](https://travis-ci.org/kevva/ext-name.svg?branch=master)](https://travis-ci.org/kevva/ext-name)\n\n> Get the file extension and MIME type from a file\n\n\n## Install\n\n```\n$ npm install --save ext-name\n```\n\n\n## Usage\n\n```js\nconst extName = require('ext-name');\n\nconsole.log(extName('foobar.tar'));\n//=> [{ext: 'tar', mime: 'application/x-tar'}]\n\nconsole.log(extName.mime('application/x-tar'));\n//=> [{ext: 'tar', mime: 'application/x-tar'}]\n```\n\n\n## API\n\n### extName(filename)\n\nReturns an `Array` with objects with the file extension and MIME type.\n\n#### filename\n\nType: `string`\n\nGet the extension and MIME type from a filename.\n\n### extName.mime(mimetype)\n\nReturns an `Array` with objects with the file extension and MIME type.\n\n#### mimetype\n\nType: `string`\n\nGet the extension and MIME type from a MIME type.\n\n\n## Related\n\n* [ext-name-cli](https://github.com/kevva/ext-name-cli) - CLI for this module\n* [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array\n\n\n## License\n\nMIT © [Kevin Mårtensson](https://github.com/kevva)\n","_attachments":{},"homepage":"https://github.com/kevva/ext-name#readme","bugs":{"url":"https://github.com/kevva/ext-name/issues"},"license":"MIT"}