1.0.4 • Published 7 years ago

pubip v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

With this module you can get your current public ip adress.

Install:
npm install --save pubip
Usage:
var publicIp = require("pubip");

publicIp.ip(function(ip){
	if(ip){
		console.log('IP: '+ip);
	}else{
		console.log('IP: Not found!');
	}
});

publicIp.v4(function(ip){
	if(ip){
		console.log('V4: '+ip);
	}else{
		console.log('V4: Not found!');
	}
});

publicIp.v6(function(ip){
	if(ip){
		console.log('V6: '+ip);
	}else{
		console.log('V6: Not found!');
	}
});

publicIp.both(function(v4, v6){
	if(v4) console.log('Both V4: '+v4);
	if(v6) console.log('Both V6: '+v6);
});
Used services:
  • icanhazip.com
  • ident.me
  • ipify.org
1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago