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 0.3.3 to 0.3.4

7

lib/lookup_service.js

@@ -25,3 +25,3 @@ var Database = require('./database'),

for (var i = _dbs.length - 1; i >= 0; i--) {
if (types.indexOf(_dbs[i].type) > -1)
if (~types.indexOf(_dbs[i].type))
return _dbs[i];

@@ -36,3 +36,5 @@ }

module.exports.getDb = _getDb;
module.exports.ip2Long = function(ip) {

@@ -145,4 +147,3 @@ ip = ip.split('.', 4);

// shouldn't reach here
return 0;
throw new Error('Should not reach here');
};

@@ -149,0 +150,0 @@

@@ -27,3 +27,3 @@ var DynBuffer = require('../dyn_buffer');

return recordBuf.toString('utf8', 0, pointer);
return recordBuf.toString('binary', 0, pointer);
};
{
"name": "maxmind",
"version": "0.3.3",
"version": "0.3.4",
"homepage": "https://github.com/runk/node-maxmind",

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

@@ -147,8 +147,12 @@ var assert = require('assert'),

it('should return ISP by ip', function() {
assert.equal(ls.getOrganization('109.60.171.33'), 'AS47241 CJSC "Ivtelecom"')
assert.equal(ls.getOrganization('64.4.4.4'), 'AS8075 Microsoft Corp')
assert.equal(ls.getOrganization('210.250.100.200'), 'AS2527 So-net Entertainment Corporation')
assert.equal(ls.getOrganization('109.60.171.33'), 'AS47241 CJSC "Ivtelecom"');
assert.equal(ls.getOrganization('64.4.4.4'), 'AS8075 Microsoft Corp');
assert.equal(ls.getOrganization('210.250.100.200'), 'AS2527 So-net Entertainment Corporation');
});
it('should work fine with utf8', function() {
assert.equal(ls.getOrganization('189.63.71.77'), 'AS28573 Serviços de Comunicação S.A.');
});
});
});
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