New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0.8 to 1.0.9

test/geo-lookup.test.js

18

lib/geoip.js

@@ -5,10 +5,15 @@ var fs = require('fs'),

var lookup4, lookup6;
var lookup4, lookup6, geodatadir;
if (typeof global.geodatadir === 'undefined'){
geodatadir = path.join(__dirname, '/../data/');
} else {
geodatadir = global.geodatadir;
}
(function() {
var ifile, ifd, sz, recsz, buff, lrecsz, lbuff;
try {
ifile = path.join(__dirname, '/../data/geoip-city-names.dat');
ifile = path.join(geodatadir, 'geoip-city-names.dat');
ifd = fs.openSync(ifile, "r");

@@ -22,3 +27,3 @@ sz = fs.fstatSync(ifd).size;

ifile = path.join(__dirname, '/../data/geoip-city.dat');
ifile = path.join(geodatadir, 'geoip-city.dat');
ifd = fs.openSync(ifile, "r");

@@ -39,3 +44,3 @@ sz = fs.fstatSync(ifd).size;

console.warn("======================== Warning ========================\n\n");
ifile = path.join(__dirname, '/../data/geoip-country.dat');
ifile = path.join(geodatadir, 'geoip-country.dat');
ifd = fs.openSync(ifile, "r");

@@ -134,4 +139,3 @@ sz = fs.fstatSync(ifd).size;

(function() {
var ifile = path.join(__dirname, '/../data/geoip-country6.dat');
var ifile = path.join(geodatadir, 'geoip-country6.dat');
var ifd = fs.openSync(ifile, "r");

@@ -138,0 +142,0 @@ var sz = fs.fstatSync(ifd).size;

{
"name" : "geoip-lite",
"version" : "1.0.8",
"version" : "1.0.9",
"description" : "A light weight native JavaScript implementation of GeoIP API from MaxMind",

@@ -11,4 +11,9 @@ "keywords" : ["geo", "geoip", "ip", "ipv4", "ipv6", "geolookup", "maxmind", "geolite"],

"repository" : { "type": "git", "url": "git://github.com/bluesmoon/node-geoip.git" },
"engines" : { "node": ">=0.5.7" }
"engines" : { "node": ">=0.5.7" },
"scripts" : {
"test" : "mocha test/geo-lookup.test.js"
},
"devDependencies": {
"mocha": "~1.0.3"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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