Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geoip-lite

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geoip-lite - npm Package Compare versions

Comparing version 1.4.6 to 1.4.7

12

lib/geoip.js

@@ -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 = {};

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc