# cidr-overlap

> a simple tool for finding subnet overlaps

Latest version **0.0.4** (published 2018-06-15) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2018-06-15 |
| First published | 2018-06-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 2 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joe Sanford |
| Maintainers | joesanford |
| Keywords | cidr, ip, address, addresses, subnet, networking |

## Links

- npm: https://www.npmjs.com/package/cidr-overlap
- Repository: https://github.com/joesanford/cidr-overlap
- Homepage: https://github.com/joesanford/cidr-overlap#readme
- Issues: https://github.com/joesanford/cidr-overlap/issues
- npm.io page: https://npm.io/package/cidr-overlap

## Dependencies (2)

- [ip-cidr](https://npm.io/package/ip-cidr.md) ^2.0.0
- [netaddr](https://npm.io/package/netaddr.md) ^1.1.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2018-06-15
- 0.0.3 — 2018-06-15
- 0.0.2 — 2018-06-15
- 0.0.1 — 2018-06-15

## README

# cidr-overlap
![CircleCI](https://img.shields.io/circleci/project/github/joesanford/cidr-overlap.svg?style=flat-square "Circle CI Status")
![npm](https://img.shields.io/npm/v/cidr-overlap.svg?style=flat-square "npm version")
> Get an array of overlaps that exist for a given array of CIDRs for subnets

## Installation
```
$ npm i --save cidr-overlap
```

## Example
```js
const cidrOverlap = require('cidr-overlap');

cidrOverlap(['10.0.3.0/24', '10.0.1.0/16']);
//=> [ { startAddress: '10.0.3.0',
//=>     endAddress: '10.0.3.255',
//=>     cidr1: '10.0.3.0/24',
//=>     cidr2: '10.0.1.0/16',
//=>     overlapCidr: '10.0.3.0/24' } ]
```

## API
### cidrOverlap([cidrs])
- `cidr` {Array} Strings of CIDRs representing subnets in the format `'1.2.3.4/24'`. Required.

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