cache-content-type

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

MIT 4 个版本
安装
npm install cache-content-type
yarn add cache-content-type
pnpm add cache-content-type
bun add cache-content-type
README

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.

版本列表
2.1.0 2025-03-11
2.0.0 2024-06-08
1.0.1 2018-07-18
1.0.0 2018-07-11