content-range
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

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

Package Sidebar

Install

npm i content-range

Weekly Downloads

7,599

Version

2.0.2

License

MIT

Unpacked Size

12.6 kB

Total Files

11

Last publish

Collaborators

  • neoziro