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.2.0 to 0.2.1

test/GeoIP.dat

4

lib/lookup_service.js

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

DynBuffer = require('./dyn_buffer'),
countries = require('./country_data');
countries = require('./country_data'),
region = require('./region_name');

@@ -262,2 +263,3 @@ const US_OFFSET = 1;

record.region = recordBuf.toString('binary', recordBufOffset, recordBufOffset + pointer);
record.regionName = region(record.countryCode, record.region);

@@ -264,0 +266,0 @@ recordBufOffset += pointer + 1;

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

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

@@ -1,2 +0,1 @@

node-maxmind

@@ -53,4 +52,4 @@ ========

You can initialize module with several databases, and they will be automatically selected for lookup requests.
If any options were given they apply for all databases you want to initialize.
You can initialize module with several databases, and they will be automatically selected for particular queries.
If any options given they apply for all databases you initialize.

@@ -60,3 +59,3 @@ ```js

maxmind.init(['/path/to/GeoLiteCity.dat', '/path/to/GeoIPASNum.dat']);
// not both org and location lookups will work
// now both org and location lookups will work
console.log(maxmind.getOrganization("66.6.44.4"));

@@ -69,3 +68,3 @@ console.log(maxmind.getLocation("66.6.44.4"));

By default module does not use cache, and works directly with file system. Enabling cache
leads to better performance, howerver consumer more memory. Currently module supports two options:
leads to better performance, however consumes more memory. Currently module supports two options:

@@ -87,7 +86,7 @@ - `indexCache` saves in memory only the country index

- `indexCache`: 80,000 lookups / second
- `memodyCache`: 130,000 lookups / second
- `memoryCache`: 130,000 lookups / second
## Tests
If you want ot run tests you will need `mocha` installed, then just run it:
If you want to run tests you will need `mocha` installed, then just run it:

@@ -94,0 +93,0 @@ $ mocha

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