cache-content-type

node-modules
esm cjs
cache-content-type JS library on GitHub cache-content-type JS library on npm Download cache-content-type JS library

Create a full Content-Type header given a MIME type or extension and cache the result

Version 2.1.0 License MIT
cache-content-type has no homepage
cache-content-type JS library on GitHub
cache-content-type JS library on npm
Download cache-content-type JS library
Keywords
mimecontent-typelru

cache-content-type

NPM version Node.js CI Test coverage Known Vulnerabilities npm download Node.js Version PRs Welcome CodeRabbit Pull Request Reviews

The same as mime-types's contentType method, but with result cached.

Install

npm i cache-content-type

Usage

import { getType } from 'cache-content-type';

const contentType = getType('html');
assert.equal(contentType, 'text/html; charset=utf-8');

License

MIT

Contributors

Contributors

Made with contributors-img.