Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Files

Latest commit

ecb6476 · Jul 11, 2018

History

History
17 lines (12 loc) · 341 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 341 Bytes

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');