← All repos

content-type

Create and parse HTTP Content-Type header

content-typehttpjavascriptnodejs
Browse cluster: Node.js HTTP utilities & middleware
136commits
12contributors
1languages

Tech stack & purpose

content-type is a JavaScript and Node.js library for creating and parsing HTTP Content-Type headers. It provides two main functions: parse() to extract the media type and parameters from a Content-Type header string, and format() to construct a properly formatted header from an object. The parser is lenient and designed to handle various input formats, with optional parameters to control parsing behavior such as skipping parameters or stopping at commas for Accept header compatibility.

Languages

TypeScript
100.0%

Contributors