@kcak11/myip
A Utility to fetch IP Addresses
Last updated a month ago by kcak11.npm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kcak11/myip 
SYNC missed versions from official npm registry.

MyIP - A Utility to fetch IP Addresses

Installation:

$ npm i -g @kcak11/myip

Usage as Command Line Interface (CLI):

$ myip

The above will output the current IP addresses associated with your machine as below:

                                                          
 Following are the IP Addresses for your machine:         
                                                          
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 |       IP Address     | Usage in a web-browser        | 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 |      xyz.pqr.a.b     | http://xyz.pqr.a.b            | 
 |   xyz.pq.abc.def     | http://xyz.pq.abc.def         | 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
                                                          
 External(public) IP: XXX.YY.ZZ.AAA                  
                                                          

Usage in Node Scripts

const myip=require("@kcak11/myip");
let listOfIP = myip(); // listOfIP will be an array containing the IP addresses.
console.log(listOfIP);

let externalIP = require("@kcak11/myip/external");
externalIP().then((data) => {
  console.log("External IP: " + data);
});

Output:

["xyz.pqr.a.b","xyz.pq.abc.def"]
External IP: XXX.YY.ZZ.AAA

License: MIT License

© 2019 kcak11.com

Current Tags

  • 3.1.0                                ...           latest (a month ago)

18 Versions

  • 3.1.0                                ...           a month ago
  • 3.0.0                                ...           a month ago
  • 2.1.3 [deprecated]           ...           5 months ago
  • 2.1.2 [deprecated]           ...           5 months ago
  • 2.1.1 [deprecated]           ...           6 months ago
  • 2.1.0 [deprecated]           ...           6 months ago
  • 2.0.2 [deprecated]           ...           6 months ago
  • 2.0.1 [deprecated]           ...           6 months ago
  • 2.0.0 [deprecated]           ...           6 months ago
  • 1.0.7 [deprecated]           ...           6 months ago
  • 1.0.6 [deprecated]           ...           6 months ago
  • 1.0.5 [deprecated]           ...           6 months ago
  • 1.0.4 [deprecated]           ...           6 months ago
  • 1.0.3 [deprecated]           ...           6 months ago
  • 1.0.2 [deprecated]           ...           6 months ago
  • 1.0.1 [deprecated]           ...           6 months ago
  • 1.0.0 [deprecated]           ...           6 months ago
  • 0.0.1 [deprecated]           ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 18
Last Month 18
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |