5.0.1 • Published 12 days ago

@kcak11/myip v5.0.1

Weekly downloads
22
License
MIT
Repository
github
Last release
12 days ago

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.myip);
  console.log("Country: " + data.country);
});

Output:

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

License: MIT License

© 2023 kcak11.com

5.0.1

12 days ago

5.0.0

1 month ago

4.1.1

3 months ago

4.1.0

5 months ago

4.0.2

2 years ago

4.0.1

3 years ago

4.0.0

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.1.3

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

4 years ago