cidr-overlapped
v0.2.1
Published
Check if cidr overlapped.
Downloads
3
Readme
cidr-overlapped
Node.js
Install
$ npm i cidr-overlapped
const cidrOverlapped = require('cidr-overlapped')
Example
cidrOverlapped(['172.22.2.0/24'], '172.22.2.0/24') // true
cidrOverlapped(['172.22.2.0/24'], '172.22.3.0/24') // false
Browser
Example
<script src="cidrOverlapped.js"></script>
<script>
console.log(cidrOverlapped(['172.22.2.0/24'], '172.22.2.0/24')) // true
</script>
cidrOverlapped
cidrOverlapped(subnets, subnet)
subnets
: (Array) List of existing subnetssubnet
: (String) Subnet to check for overlap