Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 714 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 714 Bytes

cidr-coalesce CircleCI

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

$ 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

import coalesce 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.