张益铭 9064b372e8 docs:更新文档 4 anos atrás
..
History.md 9064b372e8 docs:更新文档 4 anos atrás
README.md 9064b372e8 docs:更新文档 4 anos atrás
index.js 9064b372e8 docs:更新文档 4 anos atrás
package.json 9064b372e8 docs:更新文档 4 anos atrás

README.md

cache-content-type

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

Install

npm i cache-content-type

Usage

const getType = require('cache-content-type');
const contentType = getType('html');
assert(contentType === 'text/html; charset=utf-8');