Check if IP address is private.
$ npm install private-ip --save
or
$ yarn add private-ip
import isIpPrivate from 'private-ip';
isIpPrivate('10.0.0.0');
// => true
isIpPrivate('101.0.26.90');
// => false
$ npm run test
$ npm run build
- Damir Mustafin @frenchbread
- Sick.Codes @sickcodes - https://twitter.com/sickcodes
- John Jackson @johnjhacking - https://twitter.com/johnjhacking
- Nick Sahler @nicksahler - https://twitter.com/tensor_bodega
https://github.com/frenchbread/private-ip/blob/master/CREDITS.md
https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry-1.csv