# range-collector

> Collect ranges

Latest version **1.0.0** (published 2019-01-05) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-01-05 |
| First published | 2019-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 <11.0.0 |
| Dependencies | 0 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexandre Sobolevski |
| Maintainers | alexnadresobolevski |

## Links

- npm: https://www.npmjs.com/package/range-collector
- npm.io page: https://npm.io/package/range-collector

## Recent versions

- 1.0.0 (latest) — 2019-01-05

## README

# Range Collector

### Usage

```javascript
const RC = require('range-collector');
const rc = new RC();
rc.add([1, 5]);
rc.add([10, 50]);
rc.add([11, 51]);
rc.remove([1, 2]);
rc.remove([25, 27]);
rc.remove([40, 100]);
rc.print();
// prints to console [2, 5) [10, 25) [27, 40)
```


### Development

```bash
$ node -v
v10.13.0
$ npm -v
6.4.1
$ npm i
# Run unit tests
$ npm run test
# Try out things in /index.js
$ npm run start
```

- RangeCollection class is in /lib/RangeCollector.js
- RangeCollection unit tests are in /lib/RangeCollector.spec.js

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