How to use the ip2location-nodejs.IP2Location_get_all function in ip2location-nodejs

To help you get started, we’ve selected a few ip2location-nodejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github advertine / node-ip2location / test / bench.js View on Github external
console.log("ip2location dropin:");
console.log("\nIP2Location_get_all()");
test(dropin.IP2Location_get_all);
console.log("\nIP2Location_get_country_short()");
test(dropin.IP2Location_get_country_short);

dropin.IP2Location_init();

console.log();

if (ip2loc) {
  ip2loc.IP2Location_init(file)
  console.log('-------------------');
  console.log("ip2location-nodejs:");
  console.log("\nIP2Location_get_all()");
  test(ip2loc.IP2Location_get_all, true);
  console.log("\nIP2Location_get_country_short()");
  test(ip2loc.IP2Location_get_country_short.bind(ip2loc), true);
}

ip2location-nodejs

IP2Location geolocation component

MIT
Latest version published 6 months ago

Package Health Score

62 / 100
Full package analysis