content-range

JSON →
library 2.0.2 ·javascript
verified Jun 4, 2026

Parser and formatter for the HTTP/1.1 Content-Range header field. Current stable version is 2.0.2, released periodically via npm. Provides two functions: format() to build the header string from object parameters (unit, start, end, size) and parse() to parse the header string into an object with unit, start, end, and length. Ships TypeScript definitions. Key differentiator: lightweight (no dependencies) and focuses solely on Content-Range, unlike larger HTTP libraries.