UNPKG

geoip-country-lite

Version:

A fork of GeoIP-lite, a light-weight, native JavaScript implementation of GeoIP API from MaxMind that only supports country data.

21 lines (13 loc) 359 B
var geoip = require('../lib/geoip'); module.exports = { testLookup: function(test) { test.expect(2); var ip = '8.8.4.4'; var ipv6 = '2001:4860:b002::68'; var actual = geoip.lookup(ip); test.ok(actual, 'should return data about IPv4.'); actual = geoip.lookup(ipv6); test.ok(actual, 'should return data about IPv6.'); test.done(); } };