content-type
npmv2.0.0TypeScriptCreate and parse HTTP Content-Type header
Overview
content-type is an npm package that create and parse HTTP Content-Type header. It is extremely widely used, with about 135.6M downloads per week and 3 known dependents in the graph. The latest version is 2.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need create and parse HTTP Content-Type header and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (135.6M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of content-type.
Dependencies
Dev (4)
Used by
Popular packages that depend on content-type.
Alternatives to content-type
Create and parse Content-Disposition header
Manipulate the HTTP Vary header
Create simple HTTP ETags
Parse HTTP X-Forwarded-For header
Parse HTTP X-Forwarded-For header
Parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard
HTTP status utility
Create HTTP error objects
HTTP response freshness testing
Fast, unopinionated, minimalist web framework
Promise based HTTP client for the browser and node.js
Range header field string parser
Frequently installed together
The ultimate javascript content-type utility.
Create HTTP error objects
An AST-based pattern checker for JavaScript.
Infer the content-type of a request.
Execute a callback when a request closes, finishes, or errors
Lightweight debugging utility for Node.js and the browser
A querystring parser that supports nesting and arrays, with a depth limit
HTTP status utility
Encode a URL to a percent-encoded form, excluding already-encoded sequences
Higher-level content negotiation
Create and parse Content-Disposition header
HTTP response freshness testing
Version history
| Version | Published | License |
|---|---|---|
| 2.0.0latest | 2 months ago | MIT |
| 1.0.5 | 3 years ago | MIT |
| 1.0.4 | 8 years ago | MIT |
| 1.0.3 | 8 years ago | MIT |
| 1.0.2 | 10 years ago | MIT |
| 1.0.1 | 11 years ago | MIT |
| 1.0.0 | 11 years ago | MIT |
| 0.0.1 | 12 years ago | Unlicense <http://unlicense.org/> |
Maintainers
Funding
Frequently asked questions
How do I install content-type?
Run `npm install content-type` to add content-type to your npm project.
What license is content-type released under?
content-type is distributed under the MIT license.
How popular is content-type?
content-type has approximately 135,594,507 downloads per week and 3 known dependent packages.