Create a full Content-Type header given a MIME type or extension and cache the result
npm install cache-content-type[![NPM version][npm-image]][npm-url]

[![Test coverage][codecov-image]][codecov-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]


!CodeRabbit Pull Request Reviews
[npm-image]: https://img.shields.io/npm/v/cache-content-type.svg?style=flat-square
[npm-url]: https://npmjs.org/package/cache-content-type
[codecov-image]: https://codecov.io/github/node-modules/cache-content-type/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/cache-content-type?branch=master
[snyk-image]: https://snyk.io/test/npm/cache-content-type/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/cache-content-type
[download-image]: https://img.shields.io/npm/dm/cache-content-type.svg?style=flat-square
[download-url]: https://npmjs.org/package/cache-content-type
The same as mime-types's contentType method, but with result cached.
``bash`
npm i cache-content-type
`ts
import { getType } from 'cache-content-type';
const contentType = getType('html');
assert.equal(contentType, 'text/html; charset=utf-8');
``

Made with contributors-img.