1.1.0 • Published 8 years ago
is-local-ip v1.1.0
is-local-ip
Check that a given IP Address is private.
Installation
Npm
npm install is-local-ipExample
var isLocal = require('is-local-ip');
isLocal("127.0.0.1"); // true
isLocal("::ffff:127.0.0.1"); // true
isLocal("192.168.0.12"); // true
isLocal("184.55.123.2"); // falseValid Private IP'S
::::1fc00::/7fe80::/1010.0.0.0-10.255.255.255127.0.0.0-127.255.255.255169.254.1.0-169.254.254.255172.16.0.0-172.31.255.255192.168.0.0-192.168.255.255
Contributions
- Use
npm testto run tests.
Please feel free to create a PR!