node-geoip-native icon indicating copy to clipboard operation
node-geoip-native copied to clipboard

Faulty example

Open thorwald opened this issue 12 years ago • 0 comments

var geoip = require("geoip-native");
var ip = "123.123.123.123";
geoip.lookup(ip);
console.log("country: " + ip.name + " / " + ip.code);

Should be more like:

var geoip = require("geoip-native");
var ip = "123.123.123.123";
var result = geoip.lookup(ip);
console.log("country: " + result.name + " / " + result.code);

thorwald avatar Jun 05 '13 15:06 thorwald