# cidr-coalesce

> Calculate the minimum required set of CIDRs to fully cover a set of address ranges and addresses

Latest version **1.0.0** (published 2017-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install cidr-coalesce
pnpm add cidr-coalesce
yarn add cidr-coalesce
bun add cidr-coalesce
```

Provides the command `cidr-coalesce`.

## 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 | 2017-07-09 |
| First published | 2017-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nestor Hernandez Ojeda |
| Maintainers | nesukun |

## Links

- npm: https://www.npmjs.com/package/cidr-coalesce
- npm.io page: https://npm.io/package/cidr-coalesce

## Dependencies (2)

- [commander](https://npm.io/package/commander.md) ^2.11.0
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.23.0

## Recent versions

- 1.0.0 (latest) — 2017-07-09

## README

# cidr-coalesce

Get the minimum set of CIDR that covers every and only the input addresses or ranges.

Accepts IPv4 addresses in the following formats
- Single IP: `127.0.0.1`
- IP range: `192.168.1.0-192.168.1.40`
- CIDR: `192.168.1.0/27`

## Usage

### CLI
```sh
$ cidr-coalesce 192.168.1.0-192.168.1.40
192.168.1.0/27
192.168.1.32/29
192.168.1.40/32
```

### API
```js
import coalsece from 'cidr-coalesce';

const result = coalesce(['192.168.1.0', '192.168.1.40']);
// result = ['192.168.1.0/27', '192.168.1.32/29', '192.168.1.40/32']
```

## options

### quiet

Suppreses all error output.

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