Socket
Socket
Sign inDemoInstall

private-ip

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

private-ip

Check if IP address is private.


Version published
Weekly downloads
83K
decreased by-16.63%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 25 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc