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

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

Notifications You must be signed in to change notification settings

alibaba-archive/cache-content-type

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

No packages published