https://github.com/gregberge/content-range
Parser and formatter for HTTP/1.1 Content-Range header field.
https://github.com/gregberge/content-range
content-range header http
Last synced: 23 days ago
JSON representation
Parser and formatter for HTTP/1.1 Content-Range header field.
- Host: GitHub
- URL: https://github.com/gregberge/content-range
- Owner: gregberge
- License: mit
- Created: 2014-04-10T12:13:56.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2022-06-18T20:08:04.000Z (almost 3 years ago)
- Last Synced: 2025-04-09T14:08:12.908Z (about 2 months ago)
- Topics: content-range, header, http
- Language: TypeScript
- Homepage:
- Size: 1020 KB
- Stars: 9
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# content-range

Parser and formatter for HTTP/1.1 Content-Range header field.
## Install
```sh
npm install content-range
```## Usage
```js
import { format, parse } from "content-range";format({
unit: "bytes",
start: 10,
end: 20,
size: 100,
});
// bytes 10-20/100parse("bytes 10-20/100");
// {
// unit: "bytes",
// start: 10,
// end: 20,
// length: 100,
// }
```## License
MIT