Skip to content

Parser and formatter for HTTP/1.1 Content-Range header field.

License

Notifications You must be signed in to change notification settings

gregberge/content-range

Repository files navigation

content-range

Node.js CI

Parser and formatter for HTTP/1.1 Content-Range header field.

Install

npm install content-range

Usage

import { format, parse } from "content-range";

format({
  unit: "bytes",
  start: 10,
  end: 20,
  size: 100,
});
// bytes 10-20/100

parse("bytes 10-20/100");
// {
//   unit: "bytes",
//   start: 10,
//   end: 20,
//   length: 100,
// }

License

MIT

About

Parser and formatter for HTTP/1.1 Content-Range header field.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •