1 line
17 KiB
Plaintext
1 line
17 KiB
Plaintext
{"_id":"mrmime","_rev":"17-f8cf57534ede13b9109e30d83fec88a8","name":"mrmime","dist-tags":{"latest":"2.0.1"},"versions":{"0.1.0":{"name":"mrmime","version":"0.1.0","author":{"url":"@tbranyen","name":"Tim Branyen"},"license":"MIT","_id":"mrmime@0.1.0","maintainers":[{"name":"tbranyen","email":"tim@tabdeveloper.com"}],"dist":{"shasum":"93442f57437476e6f38adb323f9feefb4878ba91","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-0.1.0.tgz","integrity":"sha512-Y93tBF/t3rKXGSwe5HV8N5qfKZ17LtP5O9z/JN79/SrjTCbYcduT0Hnk7u23nuZqbFY5fFbkt1gk9iwSDbO0eg==","signatures":[{"sig":"MEUCIFRYWciPDQsfCH6YnKrMqXii8DEzwaI2NvWJFCdRO20pAiEA8D0zIObG+5+MePim28GXb8mt1oexXduUNpeBfRF50I4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"93442f57437476e6f38adb323f9feefb4878ba91","gitHead":"e8f57b3c538f6f96061746bbfbf54f37d26e67dd","scripts":{"test":"mocha test","record":"RECORD=true DEBUG=true node lib/instrument","instrument":"DEBUG=true node lib/instrument"},"_npmUser":{"name":"tbranyen","email":"tim@tabdeveloper.com"},"_npmVersion":"1.4.21","description":"A Node.js fixture mocking library that actually works.","directories":{},"dependencies":{"express":"^4.6.1","js-yaml":"^3.1.0","promise":"^5.0.0","request":"^2.37.0","promisify-node":"^0.1.2"}},"0.1.1":{"name":"mrmime","version":"0.1.1","author":{"url":"@tbranyen","name":"Tim Branyen"},"license":"MIT","_id":"mrmime@0.1.1","maintainers":[{"name":"tbranyen","email":"tim@tabdeveloper.com"}],"dist":{"shasum":"415ea9b0bebd97d63a7c97100cb2535ec132fb11","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-0.1.1.tgz","integrity":"sha512-2IwJxQvd+r3psFEiAY6+w42UBGuxFTi4wBd5FiK1xYNRBbmGmA5PazHcc8LlFPz72AUjPVsGtN1oxCjHOeVmlA==","signatures":[{"sig":"MEQCIGJRznGN2BzpBVOHa+i2xO7nTGz/FtQBIveiHdf7YJC/AiADZROiYKOOykl74KpYNc9VE2XCd/w0hujVKMjEV+IIog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"415ea9b0bebd97d63a7c97100cb2535ec132fb11","gitHead":"afe83e867eeb119b946eda9a05e70b8ac88c284a","scripts":{"test":"mocha test","record":"RECORD=true DEBUG=true node lib/instrument","instrument":"DEBUG=true node lib/instrument"},"_npmUser":{"name":"tbranyen","email":"tim@tabdeveloper.com"},"_npmVersion":"1.4.21","description":"A Node.js fixture mocking library that actually works.","directories":{},"dependencies":{"express":"~4.6.1","js-yaml":"~3.1.0","promise":"~5.0.0","request":"~2.37.0","body-parser":"~0.1.0","promisify-node":"~0.1.2"}},"0.1.2":{"name":"mrmime","version":"0.1.2","author":{"url":"@tbranyen","name":"Tim Branyen"},"license":"MIT","_id":"mrmime@0.1.2","maintainers":[{"name":"tbranyen","email":"tim@tabdeveloper.com"}],"dist":{"shasum":"330445be92218ea613be9515d978102e37fc721f","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-0.1.2.tgz","integrity":"sha512-KxdiQ9o4xTZv6zLyJ1FWABKq/+w9YI3cgl32xeUGbD4tdITzOgXkvCNnsbqq8ETLIOqGxBtkk0BGQkE4YsiVPA==","signatures":[{"sig":"MEUCIQDZWxJY/+jXDca0+v+EUYc6HE7oP3fWOazllr8Inwku6wIgO1KWFU7A5jFHmYnwDVTH9U88ehfz1YXwKmWhKCuX02Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/index.js","_from":".","_shasum":"330445be92218ea613be9515d978102e37fc721f","gitHead":"6406adea574400345d6caa8bdeb291e43d7fb661","scripts":{"test":"mocha test","record":"RECORD=true DEBUG=true node lib/instrument","instrument":"DEBUG=true node lib/instrument"},"_npmUser":{"name":"tbranyen","email":"tim@tabdeveloper.com"},"_npmVersion":"1.4.21","description":"A Node.js fixture mocking library that actually works.","directories":{},"dependencies":{"express":"~4.6.1","js-yaml":"~3.1.0","promise":"~5.0.0","request":"~2.37.0","body-parser":"~1.5.0","promisify-node":"~0.1.2"}},"1.0.0":{"name":"mrmime","version":"1.0.0","keywords":["mime","extension","mimetype"],"author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"mrmime@1.0.0","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/mrmime#readme","bugs":{"url":"https://github.com/lukeed/mrmime/issues"},"dist":{"shasum":"14d387f0585a5233d291baba339b063752a2398b","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz","fileCount":6,"integrity":"sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==","signatures":[{"sig":"MEQCID/vy2khpqgmY4jmeuz6VKZryXGHR+zByep0X5EmA/M8AiAwDsPegNFHQ3LgIpB6KD9knheS5M7BTB/wxS5sgC0nqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31007,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2zwKCRA9TVsSAnZWagAAzCUQAKUqjdxstHfpsmjGg5cT\nVsJ+xsJzxwoiK0DFtj/vQanPuOPo0ZEI7OQWSmStJlP3Ji2uOfTRkBzGh/Ka\nA8FY6bWlVFCRyNldQikmktKxquRgwG0xaMc/xrbc/EvQlzFq+1XJOts2B1Yi\nbj6ngAn7eZSlcTqoT5qLvSyVbFOqt7W6cBtfBZw+BmtAGafRlxoNx2IcR7fJ\n2KPHDAj+qGKocRWN1ewvuC45qCxP700WWPvIr07VmnrdyVU9NX/aoqckoH9S\npMGepstsIPXVlDNQyIv1FNDhb5fRO0/ciiP0SPr9NXP+PE4LwO3yaZi+KfAC\nBFeyCd5VW9WTP/A7tmVyvO1fOsACK+UOjeLR1DtS3IR1M0bKaNBkTofm210E\n2e3/OcQ1mUXcFNo8mf/wbUJXiBDPDlCBaXpV/lhpxFstJ1kji+IuzRlazbta\nPh4j0P2cAVBISN8MIDPjV105eeq2MpVgiR51NHdfETzOX72Nsf10md+6+E6e\nM+XL+nGrPM07NRu84coiukhw5j9cB2gtxefxgUFvLsMyXanxP2M5BERXow+Q\nqhNgFnwT1aFatc4NW6fbZ0B2XbrPLszo2X24dZx/yoCF9vFztcvqCjN4hZDi\n+JTm/3KmtcMMQaA0Gk5XcFfk4LVaXz416RLjSO0UuJIxWfN97hdS5dnpAw/j\nlPhK\r\n=BJN7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","module":"index.mjs","engines":{"node":">=10"},"exports":{".":{"import":"./index.mjs","require":"./index.js"},"./package.json":"./package.json"},"gitHead":"915ea17ae43a10f66503650d56fc8e9da36e5dba","scripts":{"test":"uvu -r esm test","build":"node bin && bundt"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/mrmime.git","type":"git"},"_npmVersion":"7.21.1","description":"A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename","directories":{},"_nodeVersion":"16.9.1","_hasShrinkwrap":false,"devDependencies":{"esm":"3.2.25","uvu":"0.5.2","bundt":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/mrmime_1.0.0_1634021917251_0.06800244257391475","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"mrmime","version":"1.0.1","keywords":["mime","extension","mimetype"],"author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"mrmime@1.0.1","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/mrmime#readme","bugs":{"url":"https://github.com/lukeed/mrmime/issues"},"dist":{"shasum":"5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz","fileCount":6,"integrity":"sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==","signatures":[{"sig":"MEQCIDo3vDV21Qp0nL1D5OV0rVJbbE3MSaebAIoKo+vpyVgrAiBUKbKbQdKuRzt5S0ucRZgHmFNALZALNkqdGxVpJo3/CQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31038,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJioMl+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMNQ//QrYqfDH83JFQ6Dc61LRIgPhQ+oGvF3hlk0F7KC9JcyXJ/lHN\r\n1G1nnKqVqk1TTq+TOy8xyu2PxF47MnEC/U6tZEJLWG6u3RAMXwkYMnvD5DmT\r\nHX2alXilfA+QrwGlesDVFUkG3wqN19VtdaEgdiW3zDbg77qW+KdpRA15fIeF\r\nJhZLv3oRHOwzn63eomGc9xy/H08viTPbtVzKYKgQMfQm0e2ZYwwq6xTe9o5H\r\n9qL6C1Gq3546vozyH+BsLW6nEM/gZNSo6ArXnELaIZSO5XYl0T8w4sPEuC53\r\nF6nP+0QTUOwSk0JZvGwWHVtpvZmV66bhb8ZX4exAniEWfKqZBbVcfVJI5K4o\r\nQMb5ga5e032TZXttsdLWRVdiCW7BwtC8KsIQNCdwEMFwAtqJ3I+oe0vx7xSc\r\nSMNJdrjKomCs+0YVvexstDg4xw+a2KgO34a0qTCQC7cYPizQHDaH5ZifYaPT\r\n2KH7OXEF003SHls/UOU7KcL4tuFuu0KuWAU2cIRtgelTzqFnUwvTQJExGzh0\r\nkdXKovphMhNm2BPKnlsWfeMAPTTCXUbV73DSbRj4W0doDOLF77VK1pk6CSXV\r\nVQDsAqMB2woGVtVg0TylV4A99+tXHpUrDANnV6uNaMCrDFe6mNNTe1+bJWcA\r\nQvBC1MoBL798ab1bpBv1sRjj+gYaFu7R4v8=\r\n=JmS9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","module":"index.mjs","engines":{"node":">=10"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.js"},"./package.json":"./package.json"},"gitHead":"8527fd70019ca8eb8055528b2ea6921851b2b6ad","scripts":{"test":"uvu -r esm test","build":"node bin && bundt"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/mrmime.git","type":"git"},"_npmVersion":"8.11.0","description":"A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename","directories":{},"_nodeVersion":"18.3.0","_hasShrinkwrap":false,"devDependencies":{"esm":"3.2.25","uvu":"0.5.2","bundt":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/mrmime_1.0.1_1654704510596_0.8181158026244222","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"mrmime","version":"2.0.0","keywords":["mime","extension","mimetype"],"author":{"url":"https://lukeed.com","name":"Luke Edwards","email":"luke.edwards05@gmail.com"},"license":"MIT","_id":"mrmime@2.0.0","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"homepage":"https://github.com/lukeed/mrmime#readme","bugs":{"url":"https://github.com/lukeed/mrmime/issues"},"dist":{"shasum":"151082a6e06e59a9a39b46b3e14d5cfe92b3abb4","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz","fileCount":6,"integrity":"sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==","signatures":[{"sig":"MEQCIGt6qHEC5yqIYLx+AUPuqDzO7eFIdnyRqVPauNeSAyGgAiAJjszUUWRQ9p/iP6QeXBPCw5lvfwPI9Vxtxn1x1Hj4Tg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32705},"main":"index.js","types":"index.d.ts","module":"index.mjs","engines":{"node":">=10"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.js"},"./package.json":"./package.json"},"gitHead":"84088a80ca3dd86ebc920f181c1f2c8bfb878508","scripts":{"test":"uvu -r tsm test","build":"tsm bin/index.ts"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"repository":{"url":"git+https://github.com/lukeed/mrmime.git","type":"git"},"_npmVersion":"10.1.0","description":"A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename","directories":{},"_nodeVersion":"20.8.1","_hasShrinkwrap":false,"devDependencies":{"tsm":"2.3.0","uvu":"0.5.2"},"_npmOperationalInternal":{"tmp":"tmp/mrmime_2.0.0_1703085882536_0.3851164833884635","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"mrmime","version":"2.0.1","repository":{"type":"git","url":"git+https://github.com/lukeed/mrmime.git"},"description":"A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename","module":"index.mjs","types":"index.d.ts","main":"index.js","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.js"},"./package.json":"./package.json"},"engines":{"node":">=10"},"scripts":{"build":"tsm bin/index.ts","test":"uvu -r tsm test"},"keywords":["mime","extension","mimetype"],"devDependencies":{"tsm":"2.3.0","uvu":"0.5.2"},"_id":"mrmime@2.0.1","gitHead":"c95e4bf5ac71e7847c7e74d409e237a37c7b5053","bugs":{"url":"https://github.com/lukeed/mrmime/issues"},"homepage":"https://github.com/lukeed/mrmime#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==","shasum":"bc3e87f7987853a54c9850eeb1f1078cd44adddc","tarball":"https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz","fileCount":6,"unpackedSize":33008,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICDRrPyK816R1ZljZE0eenrwfzk8E7HPtREkQkE53d8XAiBde1otP0Ef2bbZ2gKor1T2+fp9U4fTW3/6qE1AdPwtvw=="}]},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"directories":{},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mrmime_2.0.1_1739816224943_0.6970574894840189"},"_hasShrinkwrap":false}},"time":{"created":"2014-07-22T20:33:12.655Z","modified":"2025-02-17T18:17:05.390Z","0.1.0":"2014-07-22T20:33:12.655Z","0.1.1":"2014-07-22T20:35:16.843Z","0.1.2":"2014-07-22T20:36:34.929Z","1.0.0":"2021-10-12T06:58:37.395Z","1.0.1":"2022-06-08T16:08:30.797Z","2.0.0":"2023-12-20T15:24:42.745Z","2.0.1":"2025-02-17T18:17:05.137Z"},"bugs":{"url":"https://github.com/lukeed/mrmime/issues"},"author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"license":"MIT","homepage":"https://github.com/lukeed/mrmime#readme","keywords":["mime","extension","mimetype"],"repository":{"type":"git","url":"git+https://github.com/lukeed/mrmime.git"},"description":"A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename","maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"readme":"<div align=\"center\">\n <img src=\"logo.png\" alt=\"mrmime\" width=\"320\" />\n</div>\n\n<div align=\"center\">\n <a href=\"https://npmjs.org/package/mrmime\">\n <img src=\"https://badgen.now.sh/npm/v/mrmime\" alt=\"version\" />\n </a>\n <a href=\"https://github.com/lukeed/mrmime/actions\">\n <img src=\"https://github.com/lukeed/mrmime/workflows/CI/badge.svg\" alt=\"CI\" />\n </a>\n <a href=\"https://licenses.dev/npm/mrmime\">\n <img src=\"https://licenses.dev/b/npm/mrmime\" alt=\"licenses\" />\n </a>\n <a href=\"https://npmjs.org/package/mrmime\">\n <img src=\"https://badgen.now.sh/npm/dm/mrmime\" alt=\"downloads\" />\n </a>\n <a href=\"https://packagephobia.now.sh/result?p=mrmime\">\n <img src=\"https://packagephobia.now.sh/badge?p=mrmime\" alt=\"install size\" />\n </a>\n</div>\n\n<div align=\"center\">\n A tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename\n</div>\n\n\n## Features\n\n* Lightweight – 2.8kB gzip<br>\n _Only includes standard mime types; all experimental and vendor-specific mimetypes removed._\n\n* [Performant](#benchmarks)<br>\n _All lookups are O(1) with minimal processing._\n\n* Comprehensive Dictionary<br>\n _Generated from [`mime-db`](https://github.com/jshttp/mime-db), which aggregates the IANA, NGINX, and Apache datasets._\n\n* Customizable<br>\n _Exposes the `mimes` dictionary for easy additions or overrides._\n\n* Supports Native ESM and [Deno](https://deno.land/x/mrmime)<br>\n _Ships with CommonJS and ESM support!_\n\n\n## Install\n\n```\n$ npm install --save mrmime\n```\n\n\n## Usage\n\n```js\nimport { lookup, mimes } from 'mrmime';\n\n// Get a MIME type\n// ---\nlookup('txt'); //=> \"text/plain\"\nlookup('.txt'); //=> \"text/plain\"\nlookup('a.txt'); //=> \"text/plain\"\n\n// Unknown extension\n// ---\nlookup('.xyz'); //=> undefined\n\n// Add extension to dictionary\n// ---\nmimes['xyz'] = 'hello/world';\nlookup('xyz'); //=> \"hello/world\"\n```\n\n\n## API\n\n### lookup(input)\nReturns: `string` or `undefined`\n\n#### input\nType: `string`\n\nThe extension or filename to lookup.\n\n> **Important:**\n> * Any `input` value is cast to string, lowercased, and trimmed.\n> * If a filename or filepath is provided, only the extension will be used.\n\n\n## Benchmarks\n\n> Running on Node v16.8.0\n\n```\nLoad times:\n mrmime 0.963ms\n mime/lite 3.281ms\n mime 6.751ms\n\nBenchmark :: plain (\"ext\")\n mime x 598,849 ops/sec ±0.28% (94 runs sampled)\n mime/lite x 536,643 ops/sec ±0.11% (97 runs sampled)\n mrmime x 835,885 ops/sec ±0.20% (97 runs sampled)\n\nBenchmark :: leading (\".ext\")\n mime x 368,656 ops/sec ±0.19% (99 runs sampled)\n mime/lite x 368,318 ops/sec ±0.13% (97 runs sampled)\n mrmime x 533,643 ops/sec ±0.10% (96 runs sampled)\n\nBenchmark :: filename (\"file.ext\")\n mime x 326,907 ops/sec ±0.17% (95 runs sampled)\n mime/lite x 327,479 ops/sec ±0.12% (98 runs sampled)\n mrmime x 512,823 ops/sec ±0.12% (99 runs sampled)\n```\n\n\n## Credits\n\nOf course, a thank-you to [`mime`](https://github.com/broofa/mime) serving the community all these years & for being a all-encompassing MIME type library. I've only ever needed lookup/`getType` functionality – and now ESM support – so `mrmime` can only ever support 1/3 of what `mime` offers, at best.\n\nThis would not be possible without the team behind [`mime-db`](https://github.com/jshttp/mime-db), who have painstakingly maintained an amazing database for 7+ years.\n\nArtwork created by [mintinol](https://www.deviantart.com/mintinol), which I found [here](https://www.deviantart.com/mintinol/art/Mr-Mime-373927920).\n\nFinally, thanks to [Tim Branyen](https://github.com/tbranyen) for donating the package name :)\n\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","readmeFilename":"readme.md","users":{"flumpus-dev":true}} |