cache-content-type

v1.0.1
Create a full Content-Type header given a MIME type or extension and catch the result
mime content-type lru

cache-content-type

NPM version Node.js CI Test coverage Known Vulnerabilities npm download

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

Metadata

  • MIT
  • >= 6.0.0
  • dead_horse
  • released 7/18/2018

Downloads

Maintainers