New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

maxmind

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maxmind - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

lib/is-gzip.js

4

index.js

@@ -7,2 +7,3 @@ 'use strict';

var ip = require('./lib/ip');
var isGzip = require('./lib/is-gzip');
var utils = require('./lib/utils');

@@ -19,2 +20,5 @@

if (err) return cb(err);
if (isGzip(database)) {
return cb(new Error('Looks like you are passing in a file in gzip format, please use mmdb database instead.'));
}
var reader = new Reader(database, opts);

@@ -21,0 +25,0 @@ if (opts && !!opts.watchForUpdates) {

2

package.json
{
"name": "maxmind",
"version": "2.1.0",
"version": "2.2.0",
"homepage": "https://github.com/runk/node-maxmind",

@@ -5,0 +5,0 @@ "description": "IP lookup using Maxmind databases",

@@ -87,2 +87,11 @@ 'use strict';

it('should return an error when gzip file attempted', function(done) {
var dbPath = path.join(__dirname, 'databases/GeoIP2-City-Test.mmdb.gz');
maxmind.open(dbPath, function(err) {
assert.equal(err.message,
'Looks like you are passing in a file in gzip format, please use mmdb database instead.');
done();
});
});
it('should check for an error when cannot read database on update', function(done) {

@@ -89,0 +98,0 @@ var counter = 0;

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