JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 123187
  • Score
    100M100P100Q165088F
  • License MIT

Check if IP address is private.

Package Exports

  • private-ip
  • private-ip/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 (private-ip) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

private-ip

Check if IP address is private.

badges

huntr

Installation

npm install private-ip --save

or

❯ yarn add private-ip

Usage

const is_ip_private = require('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