Comparing version 0.2.0 to 0.2.1
@@ -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 |
18400795
35
6983
97