Socket
Book a DemoInstallSign in
Socket

cache-content-type

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-content-type

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

latest
Source
npmnpm
Version
2.1.0
Version published
Weekly downloads
3.1M
-0.13%
Maintainers
2
Weekly downloads
 
Created
Source

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.

Keywords

mime

FAQs

Package last updated on 11 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts