geoip-lite
Advanced tools
Comparing version 1.4.6 to 1.4.7
@@ -13,11 +13,7 @@ var fs = require('fs'); | ||
var geodatadir = path.resolve( | ||
__dirname, | ||
global.geodatadir || process.env.GEODATADIR || '../data/' | ||
); | ||
var geodatadir; | ||
if (typeof global.geodatadir === 'undefined'){ | ||
geodatadir = path.join(__dirname, '/../data/'); | ||
} else { | ||
geodatadir = global.geodatadir; | ||
} | ||
var dataFiles = { | ||
@@ -24,0 +20,0 @@ city: path.join(geodatadir, 'geoip-city.dat'), |
{ | ||
"name" : "geoip-lite", | ||
"version" : "1.4.6", | ||
"version" : "1.4.7", | ||
"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"], |
@@ -39,5 +39,5 @@ // fetches and converts maxmind lite databases | ||
} | ||
var dataPath = path.join(__dirname, '..', 'data'); | ||
var dataPath = path.resolve(__dirname, '..', 'data'); | ||
if (typeof geodatadir !== 'undefined') { | ||
dataPath = path.join(process.cwd(), geodatadir.split('=')[1]); | ||
dataPath = path.resolve(process.cwd(), geodatadir.split('=')[1]); | ||
if (!fs.existsSync(dataPath)) { | ||
@@ -48,3 +48,3 @@ console.log(chalk.red('ERROR') + ': Directory does\'t exist: ' + dataPath); | ||
} | ||
var tmpPath = path.join(__dirname, '..', 'tmp'); | ||
var tmpPath = path.resolve(__dirname, '..', 'tmp'); | ||
var countryLookup = {}; | ||
@@ -51,0 +51,0 @@ var cityLookup = {}; |
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
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
115397180
1336
12