{"_id":"cache-content-type","_rev":"6-48c86feabfc8a566278f277c2848c4bf","name":"cache-content-type","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"cache-content-type","version":"1.0.0","keywords":["mime","content-type","lru"],"author":{"name":"dead_horse"},"license":"MIT","_id":"cache-content-type@1.0.0","maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"homepage":"https://github.com/node-modules/cache-content-type#readme","bugs":{"url":"https://github.com/node-modules/cache-content-type/issues"},"ci":{"version":"8, 10"},"dist":{"shasum":"6ee4210bc51693af0736e8d41416c1eb771c3ffb","tarball":"https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.0.tgz","fileCount":4,"integrity":"sha512-cVbmz0rAnsK3jPcQAlK4IDUUPaYAe4yl7MAfiKftHAcrW/azF1yikn2wE/8VAcC3yWtXi3lvXwsF1akK27Vo7w==","signatures":[{"sig":"MEYCIQDuFnmsQWbl5cbq7NAUru7t4TU1HwIq6FYXTBFRw2hrtwIhALg+b/lfOn/bFfYaF3lEz3bEsWv3JZWhIFU14yffy9mO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1829,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbRbwACRA9TVsSAnZWagAAvWsP/j/ny5IiSdCHoEhU6XUm\nJnxrwBb91fYiiTqJlq5uJt/NKmm3tBv3eWEhQ8UpY0UF0zK2BuBmRk3vM/iU\neUQSqQB4kLIpqgT4kEtgvqQ2VsVoXBMMlBBfhwuCtNKKfuv0A6yUSnbbCjYJ\nKG5VyPBmLdk/ls55e6Pplv+nkSoxQLDQQ7cLn2R3dUUHmwXdQShiH0DrCsPP\nfm/DJLRuoNR9cRP6vYnJtJ4jlt41N12aQDEtnWKDlTKe0g9LDIVRvzTDkGMe\naYBEihKX0GltWdqCUUclKGRmzWSjB6JZki4syKvsAKH/ZtMYh8QShrdp22Da\n8+Udco0icKIMULQMd1zy1CstM3erVDKEkKqzoFCqpwZb6jX71OR0H1p3SFUX\nz+giLSuNwXs5opnsZ0yLIVqWYYaONkMGYib5tmRk+mPF66rOhrZm+lP6xJcG\nNPRCsElRl0a33inVd2f75LUwKKeF+ud4iaJByQhVlkJEoyrI6r3QBPHTp1ii\nTZB5ig0HHGisQcDYRSNsgs9neSguT0qIeDgp72D1g/0obZHI5u0ZNvRlFN5Z\n1H5HFDWSTQZQgbbSiCp19hc1qrYImuxmt7OLIUnuHUwDmmzaJXiNHwdv+y2Z\nZmBPUWViN95BbnZDxcUlwJzatyxmKMmK734VnYWfTKSzcvG0C4p4ADEaBk0x\nMjkS\r\n=wixH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","files":["index.js"],"engines":{"node":">= 8.0.0"},"gitHead":"c753a384e4aea6f867938eb1f59121a480b589d3","scripts":{"ci":"eslint . && npm run cov","cov":"egg-bin cov","test":"egg-bin test"},"_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"repository":{"url":"git+https://github.com/node-modules/cache-content-type.git","type":"git"},"_npmVersion":"5.8.0","description":"Create a full Content-Type header given a MIME type or extension and catch the result","directories":{},"_nodeVersion":"8.11.1","dependencies":{"ylru":"^1.2.0","mime-types":"^2.1.18"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^2.2.0","egg-ci":"^1.8.0","eslint":"^5.1.0","egg-bin":"^4.7.1","eslint-config-egg":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cache-content-type_1.0.0_1531296768754_0.9174562289955348","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"cache-content-type","version":"1.0.1","keywords":["mime","content-type","lru"],"author":{"name":"dead_horse"},"license":"MIT","_id":"cache-content-type@1.0.1","maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"}],"homepage":"https://github.com/node-modules/cache-content-type#readme","bugs":{"url":"https://github.com/node-modules/cache-content-type/issues"},"ci":{"version":"6, 8, 10"},"dist":{"shasum":"035cde2b08ee2129f4a8315ea8f00a00dba1453c","tarball":"https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz","fileCount":4,"integrity":"sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==","signatures":[{"sig":"MEYCIQDI3vxW6uON2MTKAvT/tC8c6ZIoAMxHaCndayCNGp5yFgIhAM98VT0m5vt+e34yT1seoSmnt51IWAaQxy1SJsQ73UDS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbT0vfCRA9TVsSAnZWagAAJ24P/0Lqe1UnMcZCkPT3xTxV\nz48Oihon8AfdRNnJYwvGAzWtf5gzuZpnU0yahe30WJEkvIhQ7+P+bbaVQuoK\n1bN+Dv4vJQWtaH8RE2tiSwdS1lYqM9ux4h3c23OAcUULxgzDpxPhi7VuyCck\ni36DHS1mkyMUeROzmHgPPiiW4R1h8/2Tjsjax+RQ/ioqo5kO9CtaL3/9C2gX\ntJx37u7qiXinfMfJQMNIf0e04Btw9TPskEEhqoyvjs41leYdaodU1s7bCMDQ\nsEvmSZWOS3j04Q1F+aQipDvM6dzcQcDgjit4mYCKCX2ZE1SLBnPiVoODehNG\njm7CmhvKJC67RI2L/IsySWxJXiscI2ykT6tHbG15sSOratV3eIiecue57GS8\nTjbnTb+wH3oO3Jp9z0C1Ks/GzzKuxPaK/jlgHsaddO4bDAYfu1zkIKSIw5Wd\nWh/3tIVcGn8YQrndiOucrEEbqg+DYtGXhvXd1oyiZ4Z7YWj1hFm9/9PpvUCA\nGJCm1WvLi7V2k1NFEAcnXh7PtV7ev6unaP9zohCGaxq5GOAKZHll+q9lD3tJ\nSPWUjUs9NBzkTOmonp/IgiO3eBm1oi5nWY6KSlZBQYafriZVCFitt1pLlcKf\nzyEXdYXCWH8KZpPh/BC9UaV3CeTVIa1EOCPu76uFuYe5TqRBjeb95TixAwwX\nl2ZM\r\n=+nd1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","files":["index.js"],"engines":{"node":">= 6.0.0"},"gitHead":"8a43ff8b3f800aef8fa366d99e0a2828705a9ffe","scripts":{"ci":"eslint . && npm run cov","cov":"egg-bin cov","test":"egg-bin test"},"_npmUser":{"name":"dead_horse","email":"dead_horse@qq.com"},"repository":{"url":"git+https://github.com/node-modules/cache-content-type.git","type":"git"},"_npmVersion":"5.6.0","description":"Create a full Content-Type header given a MIME type or extension and catch the result","directories":{},"_nodeVersion":"8.11.1","dependencies":{"ylru":"^1.2.0","mime-types":"^2.1.18"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^2.2.0","egg-ci":"^1.8.0","eslint":"^5.1.0","egg-bin":"^4.7.1","eslint-config-egg":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/cache-content-type_1.0.1_1531923423675_0.6944377224730394","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"cache-content-type","version":"2.0.0","keywords":["mime","content-type","lru"],"author":{"name":"dead_horse"},"license":"MIT","_id":"cache-content-type@2.0.0","maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"homepage":"https://github.com/node-modules/cache-content-type#readme","bugs":{"url":"https://github.com/node-modules/cache-content-type/issues"},"dist":{"shasum":"178b9d192e2d7008189bfb18feadf27c6d76b1ad","tarball":"https://registry.npmjs.org/cache-content-type/-/cache-content-type-2.0.0.tgz","fileCount":9,"integrity":"sha512-EsT7hAbbqm/GIKY5vto+F4oO6hFqA7BjyNQ8u2pqNrj9CPJ4OWyBHudFjnYWfc9jN0upQRv2hBJsm29kTnFmXQ==","signatures":[{"sig":"MEUCICVr6gKOtg+gF3dA7gCBnKSToqFqhgo+fP+tLeUNOY1IAiEAzh26PsTCvFp7i8o0xkb9YknZU+cHvqRjru4u3z8IepQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cache-content-type@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6348},"main":"./dist/commonjs/index.js","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","engines":{"node":">= 18.0.0"},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","source":"./src/index.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","source":"./src/index.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"gitHead":"3c8626875f9c5d0c43027714cc16c9a7d954bb54","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test","test":"npm run lint -- --fix && egg-bin test","prepublishOnly":"tshy && tshy-after"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git+https://github.com/node-modules/cache-content-type.git","type":"git"},"_npmVersion":"10.7.0","description":"Create a full Content-Type header given a MIME type or extension and cache the result","directories":{},"_nodeVersion":"18.20.3","dependencies":{"ylru":"^1.4.0","mime-types":"^2.1.35"},"_hasShrinkwrap":false,"devDependencies":{"mm":"3","tshy":"^1.15.1","eslint":"8","egg-bin":"6","tshy-after":"^1.0.0","typescript":"^5.4.5","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.3","@types/mime-types":"^2.1.4","eslint-config-egg":"13"},"_npmOperationalInternal":{"tmp":"tmp/cache-content-type_2.0.0_1717846534431_0.5420111216608616","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"cache-content-type","version":"2.1.0","engines":{"node":">= 18.0.0"},"description":"Create a full Content-Type header given a MIME type or extension and cache the result","scripts":{"clean":"tsc --build --clean","pretest":"npm run clean && npm run lint -- --fix","test":"egg-bin test","preci":"npm run clean && npm run lint","ci":"egg-bin cov","postci":"npm run prepublishOnly && npm run clean","lint":"eslint src test","prepublishOnly":"tshy && tshy-after"},"dependencies":{"mime-types":"^2.1.35","ylru":"^2.0.0"},"devDependencies":{"@eggjs/tsconfig":"2","@types/mime-types":"2","@types/mocha":"10","@types/node":"^22","@eggjs/bin":"7","eslint":"8","eslint-config-egg":"14","mm":"4","tshy":"3","tshy-after":"1","typescript":"5"},"repository":{"type":"git","url":"git+https://github.com/node-modules/cache-content-type.git"},"keywords":["mime","content-type","lru"],"author":{"name":"dead_horse"},"license":"MIT","type":"module","tshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}}},"main":"./dist/commonjs/index.js","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","_id":"cache-content-type@2.1.0","gitHead":"b4d59700bf3f0d4aad25db504cb316526fc029fa","bugs":{"url":"https://github.com/node-modules/cache-content-type/issues"},"homepage":"https://github.com/node-modules/cache-content-type#readme","_nodeVersion":"20.18.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-cunyfzwf3p86sXOE3PyWFWlPtIb21DyLV9KAq1HhrqLupxx+mtLrqXdEe9vxUmLpTLk/jP/Zf4YyAlSoAbEVEg==","shasum":"6bfb2b0d0c76a6fe1e5b93a18c2d0ce949bf05ad","tarball":"https://registry.npmjs.org/cache-content-type/-/cache-content-type-2.1.0.tgz","fileCount":11,"unpackedSize":8144,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cache-content-type@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAkxcenFdQgfA7XuaGDtQbALEfGS9MxEJiktVngzpFjwAiEA0aEC5xrX6LMdeNoplVTQwVOsvS2yIAJQS3kSk0a7F1Q="}]},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"directories":{},"maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cache-content-type_2.1.0_1741710947500_0.40461729355739284"},"_hasShrinkwrap":false}},"time":{"created":"2018-07-11T08:12:48.753Z","modified":"2025-03-11T16:35:48.050Z","1.0.0":"2018-07-11T08:12:48.833Z","1.0.1":"2018-07-18T14:17:03.773Z","2.0.0":"2024-06-08T11:35:34.622Z","2.1.0":"2025-03-11T16:35:47.693Z"},"bugs":{"url":"https://github.com/node-modules/cache-content-type/issues"},"author":{"name":"dead_horse"},"license":"MIT","homepage":"https://github.com/node-modules/cache-content-type#readme","keywords":["mime","content-type","lru"],"repository":{"type":"git","url":"git+https://github.com/node-modules/cache-content-type.git"},"description":"Create a full Content-Type header given a MIME type or extension and cache the result","maintainers":[{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"readme":"# cache-content-type\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/node-modules/cache-content-type/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/cache-content-type/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/cache-content-type.svg?style=flat)](https://nodejs.org/en/download/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)\n![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/node-modules/cache-content-type)\n\n[npm-image]: https://img.shields.io/npm/v/cache-content-type.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/cache-content-type\n[codecov-image]: https://codecov.io/github/node-modules/cache-content-type/coverage.svg?branch=master\n[codecov-url]: https://codecov.io/github/node-modules/cache-content-type?branch=master\n[snyk-image]: https://snyk.io/test/npm/cache-content-type/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/cache-content-type\n[download-image]: https://img.shields.io/npm/dm/cache-content-type.svg?style=flat-square\n[download-url]: https://npmjs.org/package/cache-content-type\n\nThe same as [mime-types](https://github.com/jshttp/mime-types)'s contentType method, but with result cached.\n\n## Install\n\n```bash\nnpm i cache-content-type\n```\n\n## Usage\n\n```ts\nimport { getType } from 'cache-content-type';\n\nconst contentType = getType('html');\nassert.equal(contentType, 'text/html; charset=utf-8');\n```\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=node-modules/cache-content-type)](https://github.com/node-modules/cache-content-type/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","readmeFilename":"README.md"}