UNPKG

ip-locator

Version:

###### Retrieve the information of an IP address or hostname.

15 lines (12 loc) 280 B
var ipapi = require('./lib/ip-api'); module.exports.getDomainOrIPDetails = function(domainOrip,reponseType,callback) { ipapi.fireRequest(domainOrip,reponseType,function(err,result){ if(err) { callback(err,null); }else { callback(null,result); } }); };