Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

bogon

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

bogon

Check if an IP is a bogon

    1.1.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
1,013
decreased by-14.15%

Weekly downloads

Readme

Source

bogon

Check if an IP is a bogon

npm install bogon

https://ipinfo.io/bogon

Usage

const bogon = require('bogon') console.log(bogon('192.168.0.1')) // true console.log(bogon('8.8.8.8')) // false

As a utility it also exposes an isPrivate helper to detect if a bogon IP is a private IP address on a local network.

console.log(bogon.isPrivate('192.168.0.1')) // true console.log(bogon('224.0.1.1')) // true console.log(bogon.isPrivate('224.0.1.1')) // false

License

MIT

FAQs

Last updated on 25 Aug 2022

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc