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

geoip-lite2

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geoip-lite2 - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

28

lib/main.js

@@ -21,3 +21,3 @@ const { open, fstat, read, close, openSync, fstatSync, readSync, closeSync } = require('fs');

country: join(geoDataDir, 'geoip-country.dat'),
country6: join(geoDataDir, 'geoip-country6.dat')
country6: join(geoDataDir, 'geoip-country6.dat'),
};

@@ -28,3 +28,3 @@

[aton4('172.16.0.0'), aton4('172.31.255.255')],
[aton4('192.168.0.0'), aton4('192.168.255.255')]
[aton4('192.168.0.0'), aton4('192.168.255.255')],
];

@@ -39,3 +39,3 @@

mainBuffer: null,
recordSize: 24
recordSize: 24,
};

@@ -48,3 +48,3 @@

mainBuffer: null,
recordSize: 48
recordSize: 48,
};

@@ -81,3 +81,3 @@

metro: null,
area: null
area: null,
};

@@ -256,3 +256,3 @@

});
}
},
], err => {

@@ -291,3 +291,3 @@ if (err) {

close(datFile, cb2);
}
},
], err => {

@@ -302,3 +302,3 @@ if (!err) {

});
}
},
]);

@@ -358,3 +358,3 @@ } else {

});
}
},
], err => {

@@ -392,3 +392,3 @@ if (err) {

close(datFile, cb2);
}
},
], err => {

@@ -401,3 +401,3 @@ if (!err) {

});
}
},
]);

@@ -472,3 +472,3 @@ } else {

preload6(cb);
}
},
], callback);

@@ -502,7 +502,7 @@ });

preload6(cb);
}
},
], callback);
},
version
version,
};

@@ -509,0 +509,0 @@

@@ -32,3 +32,3 @@ const terser = require('terser');

unused: true,
dead_code: true
dead_code: true,
},

@@ -38,15 +38,15 @@ format: {

preserve_annotations: true,
comments: false
comments: false,
},
toplevel: true
toplevel: true,
});
await fs.writeFile(path.join(outputDirectory, file), result.code, 'utf8');
console.log(`Minimized: ${file}`);
console.log('Minimized:', file);
} catch (err) {
console.error(`Error processing ${file}: ${err.message}`);
console.error(`Error processing ${file}:`, err.message);
}
}
console.log(`Completed: ${sourceDirectory}`);
console.log('COMPLETED:', sourceDirectory);
};

@@ -53,0 +53,0 @@

{
"name": "geoip-lite2",
"version": "2.2.2",
"version": "2.2.3",
"description": "A light weight native JavaScript implementation of GeoIP API from MaxMind. Improved and faster version by Sefinek.",

@@ -74,4 +74,4 @@ "keywords": [

"devDependencies": {
"@eslint/js": "^9.16.0",
"globals": "^15.13.0",
"@eslint/js": "^9.17.0",
"globals": "^15.14.0",
"jest": "^29.7.0",

@@ -78,0 +78,0 @@ "terser": "^5.37.0"

@@ -47,6 +47,6 @@ const geoIp2 = require('../lib/main.js');

expect(actual.timezone).toBe('Asia/Tokyo');
expect(actual.city).toBe('Tokushima');
expect(actual.city).toBe('Higashiōmiya');
expect(actual.ll).toBeTruthy();
expect(actual.metro).toBe(0);
expect(actual.area).toBe(500);
expect(actual.area).toBe(200);
});

@@ -63,3 +63,3 @@

expect(actual.metro).toBe(0);
expect(actual.area).toBe(20);
expect(actual.area).toBe(10);
});

@@ -75,3 +75,3 @@ });

expect(actual.timezone).toBe('Europe/Warsaw');
expect(actual.city).toBe('Warsaw');
expect(actual.city).toBe('Nowa Wieś');
expect(actual.ll).toBeTruthy();

@@ -78,0 +78,0 @@ expect(actual.metro).toBe(0);

@@ -53,5 +53,5 @@ // Fetches and converts MaxMind lite databases

'GeoLite2-Country-Blocks-IPv4.csv',
'GeoLite2-Country-Blocks-IPv6.csv'
'GeoLite2-Country-Blocks-IPv6.csv',
],
dest: ['', 'geoip-country.dat', 'geoip-country6.dat']
dest: ['', 'geoip-country.dat', 'geoip-country6.dat'],
},

@@ -66,5 +66,5 @@ {

'GeoLite2-City-Blocks-IPv4.csv',
'GeoLite2-City-Blocks-IPv6.csv'
'GeoLite2-City-Blocks-IPv6.csv',
],
dest: ['geoip-city-names.dat', 'geoip-city.dat', 'geoip-city6.dat']
dest: ['geoip-city-names.dat', 'geoip-city.dat', 'geoip-city6.dat'],
}];

@@ -129,3 +129,3 @@

path: parsedUrl.pathname + parsedUrl.search,
headers: { 'User-Agent': UserAgent }
headers: { 'User-Agent': UserAgent },
};

@@ -132,0 +132,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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