private-ip
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

private-ip

Check if IP address is private.

badges

huntr

Installation

❯ npm install private-ip --save

or

❯ yarn add private-ip

Usage

import is_ip_private from 'private-ip'

is_ip_private('10.0.0.0')
// => true

is_ip_private('101.0.26.90')
// => false

is_ip_private('not.an.ip.com')
// => undefined

Development

Tests
$ yarn run test
Build
$ yarn run build

Authors

Credits

https://github.com/frenchbread/private-ip/blob/master/CREDITS.md

License

MIT

IANA Reserved IP list

https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry-1.csv

Package Sidebar

Install

npm i private-ip

Weekly Downloads

63,969

Version

3.0.2

License

MIT

Unpacked Size

11 kB

Total Files

9

Last publish

Collaborators

  • frenchbread