{"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":"http://registry-npm.ywwl.com/cache-content-type/download/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="}],"size":3328,"noattachment":false,"key":"/cache-content-type/-/cache-content-type-2.1.0.tgz"},"_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,"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","publish_time":1741710947693,"_cnpm_publish_time":1741710947693,"dist-tags":{"latest":"2.1.0"}}