Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
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);
}
console.log();
dropin.IP2Location_init(file, mode);
console.log('-------------------');
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);
}