{"library":"range-parser","type":"library","category":null,"description":"range-parser is a foundational utility within the Node.js ecosystem, specifically designed for parsing the HTTP `Range` header field. This header is crucial for implementing partial content responses (HTTP 206 Partial Content), enabling clients to request specific byte ranges of a resource, which is essential for video streaming, resumable downloads, and efficient data retrieval. Currently at stable version 1.2.1, it provides a straightforward API to transform a `Range` header string into a structured array of byte range objects, each with `start` and `end` properties. A key characteristic is its error handling mechanism, which returns negative integer codes (e.g., -1 for unsatisfiable ranges, -2 for malformed headers) instead of throwing exceptions, requiring developers to explicitly check the return type. It offers a `combine` option to automatically merge overlapping or adjacent ranges for simplified processing. As part of the `jshttp` organization, the package is mature and highly stable, receiving updates primarily for maintenance and minor enhancements rather than frequent new feature releases, making it a reliable choice for server-side range parsing.","language":"javascript","status":"active","version":"1.2.1","tags":["javascript","range","parser","http"],"install":[{"cmd":"npm install range-parser","imports":["const parseRange = require('range-parser');","import parseRange from 'range-parser';","import type { Range, Ranges, Options } from 'range-parser';"]},{"cmd":"yarn add range-parser","imports":[]},{"cmd":"pnpm add range-parser","imports":[]}],"homepage":null,"github":"https://github.com/jshttp/range-parser","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/range-parser","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/range-parser/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}