Skip to content

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

License

Notifications You must be signed in to change notification settings

node-modules/cache-content-type

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b4d5970 · Mar 11, 2025

History

8 Commits
Jun 8, 2024
Mar 11, 2025
Jun 8, 2024
Jul 11, 2018
Jun 8, 2024
Jun 8, 2024
Mar 11, 2025
Mar 11, 2025
Mar 11, 2025
Mar 11, 2025
Mar 11, 2025

Repository files navigation

cache-content-type

NPM version Node.js CI Test coverage Known Vulnerabilities npm download Node.js Version PRs Welcome CodeRabbit Pull Request Reviews

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

License

MIT

Contributors

Contributors

Made with contributors-img.

About

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

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 100.0%