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.5.3 to 0.5.4

test/index.js

8

lib/lookup/location.js

@@ -128,7 +128,7 @@ var DynBuffer = require('../dyn_buffer'),

metroareaCombo += recordBuf.readUInt8(recordBufOffset + 0) << (0 * 8) +
recordBuf.readUInt8(recordBufOffset + 1) << (1 * 8) +
recordBuf.readUInt8(recordBufOffset + 2) << (2 * 8);
metroareaCombo += (recordBuf.readUInt8(recordBufOffset + 0) << (0 * 8)) +
(recordBuf.readUInt8(recordBufOffset + 1) << (1 * 8)) +
(recordBuf.readUInt8(recordBufOffset + 2) << (2 * 8));
record.metroCode = record.dmaCode = metroareaCombo / 1000;
record.metroCode = record.dmaCode = parseInt(metroareaCombo / 1000);
record.areaCode = metroareaCombo % 1000;

@@ -135,0 +135,0 @@ }

{
"name": "maxmind",
"version": "0.5.3",
"version": "0.5.4",
"homepage": "https://github.com/runk/node-maxmind",

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

@@ -10,3 +10,3 @@ node-maxmind [![Build Status](https://travis-ci.org/runk/node-maxmind.png)](https://travis-ci.org/runk/node-maxmind)

Free GEO databases available for download here: http://dev.maxmind.com/geoip/geolite.
Free GEO databases are available for [download here](http://dev.maxmind.com/geoip/geolite). The npm package [maxmind-geolite-mirror](https://www.npmjs.com/package/maxmind-geolite-mirror) will mirror the databases locally and only re-fetch if the remote files are newer.

@@ -13,0 +13,0 @@

@@ -143,2 +143,19 @@ var assert = require('assert'),

});
it('should return location for small country', function() {
assert.deepEqual(props(ls.getLocation('24.121.1.1')), {
countryCode: 'US',
countryName: 'United States',
region: 'AZ',
city: 'Lake Havasu City',
postalCode: '86403',
latitude: 34.48490000000001,
longitude: -114.3286,
dmaCode: 753,
areaCode: 928,
metroCode: 753,
continentCode: 'NA',
regionName: 'Arizona'
});
});
});

@@ -145,0 +162,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