Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more
Socket
Log inDemoInstall

bogon

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

bogon

Check if an IP is a bogon

    1.1.0latest
    GitHub

Version published
Maintainers
1
Weekly downloads
680
increased by5.1%

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 Socket
Socket
support@socket.devSocket 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