geoip-lite
Advanced tools
Comparing version 1.4.5 to 1.4.6
{ | ||
"name" : "geoip-lite", | ||
"version" : "1.4.5", | ||
"version" : "1.4.6", | ||
"description" : "A light weight native JavaScript implementation of GeoIP API from MaxMind", | ||
@@ -5,0 +5,0 @@ "keywords" : ["geo", "geoip", "ip", "ipv4", "ipv6", "geolookup", "maxmind", "geolite"], |
@@ -33,3 +33,16 @@ // fetches and converts maxmind lite databases | ||
} | ||
var geodatadir = args.find(function(arg) { | ||
return arg.match(/^geodatadir=[\w./]+/) !== null; | ||
}); | ||
if (typeof geodatadir === 'undefined' && typeof process.env.GEODATADIR !== 'undefined') { | ||
geodatadir = 'geodatadir='+process.env.GEODATADIR; | ||
} | ||
var dataPath = path.join(__dirname, '..', 'data'); | ||
if (typeof geodatadir !== 'undefined') { | ||
dataPath = path.join(process.cwd(), geodatadir.split('=')[1]); | ||
if (!fs.existsSync(dataPath)) { | ||
console.log(chalk.red('ERROR') + ': Directory does\'t exist: ' + dataPath); | ||
process.exit(1); | ||
} | ||
} | ||
var tmpPath = path.join(__dirname, '..', 'tmp'); | ||
@@ -36,0 +49,0 @@ var countryLookup = {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115397224
1338
11