# content-range

> Content-Range header formatter .

Latest version **2.0.2** (published 2021-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install content-range
pnpm add content-range
yarn add content-range
bun add content-range
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2021-08-30 |
| First published | 2014-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Greg Bergé |
| Maintainers | neoziro |
| Keywords | content-range, header, formatter, parser |

## Links

- npm: https://www.npmjs.com/package/content-range
- Repository: https://github.com/gregberge/content-range
- Homepage: https://github.com/gregberge/content-range#readme
- Issues: https://github.com/gregberge/content-range/issues
- Funding: https://github.com/sponsors/gregberge
- npm.io page: https://npm.io/package/content-range

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2021-08-30
- 2.0.1 — 2021-08-30
- 2.0.0 — 2021-02-07
- 1.1.1 — 2020-11-08
- 1.1.0 — 2016-04-30
- 1.0.0 — 2016-01-03
- 0.2.0 — 2014-04-11
- 0.1.2 — 2014-04-10
- 0.1.1 — 2014-04-10
- 0.1.0 — 2014-04-10

## README

# content-range

![Node.js CI](https://github.com/gregberge/content-range/workflows/Node.js%20CI/badge.svg)

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/100

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

## License

MIT

---
_Source: https://npm.io/package/content-range · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
