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

alibaba-archive/cache-content-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors