JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12554
  • Score
    100M100P100Q165522F
  • License MIT

Content-Range header formatter .

Package Exports

  • content-range

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (content-range) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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