Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

any-ipv4

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

any-ipv4

The easiest way to show an IPv4 address

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

any-ipv4

A module that exports an Array of IPv4, non internal, addresses, wuth a handy toString() method that returns its first IP, or 0.0.0.0 if no IPv4 was found.

The list of IPs is Wi-Fi first, Ethernet after, which is the most common use case I have for IoT projects and so on.

import IPv4 from 'any-ipv4';
import {createServer} from 'http';

createServer(handler).listen(8080, () => {
  console.log(`http://${IPv4}:8080/`);
});

Keywords

FAQs

Package last updated on 13 Oct 2021

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