Package Exports
- bogon
- bogon/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bogon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bogon
Check if an IP is a bogon
npm install bogon
Usage
const bogon = require('bogon')
console.log(bogon('192.168.0.1')) // true
console.log(bogon('8.8.8.8')) // falseAs a utility it also exposes an isPrivate helper
to detect if a bogon IP is a private IP address on a local network.
console.log(bogon.isPrivate('192.168.0.1')) // true
console.log(bogon('224.0.1.1')) // true
console.log(bogon.isPrivate('224.0.1.1')) // falseLicense
MIT