Comparing version 0.0.1 to 0.0.2
@@ -10,4 +10,4 @@ | ||
var _code = code, | ||
_name = name; | ||
this.code = code; | ||
this.name = name; | ||
@@ -20,3 +20,3 @@ /** | ||
this.getCode = function() { | ||
return _code; | ||
return this.code; | ||
} | ||
@@ -30,3 +30,3 @@ | ||
this.getName = function() { | ||
return _name; | ||
return this.name; | ||
} | ||
@@ -33,0 +33,0 @@ } |
{ | ||
"name": "maxmind", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"homepage": "https://github.com/runk/maxmind", | ||
@@ -5,0 +5,0 @@ "description": "IP lookup module using Maxmind databases", |
@@ -16,4 +16,14 @@ | ||
## Main features | ||
- Location lookup | ||
- Country lookup | ||
- Distance between two IP addresses (locations) | ||
- Timezone lookup by IP | ||
## Usage | ||
** see code samples in `./examples` directory ** | ||
City/Location lookup | ||
@@ -23,3 +33,3 @@ | ||
maxmind.init('/path/to/GeoLiteCity.dat') | ||
console.log(maxmind.getLocation("87.229.134.24")); | ||
console.log(maxmind.getLocation("66.6.44.4")); | ||
@@ -30,3 +40,3 @@ Country Lookup | ||
maxmind.init('/path/to/GeoIP.dat') | ||
console.log(maxmind.getCountry("87.229.134.24")); | ||
console.log(maxmind.getCountry("66.6.44.4")); | ||
@@ -38,2 +48,2 @@ ## Disclaimer | ||
Module currently work only in MEMORY_CACHE mode. | ||
Module currently work only in `MEMORY_CACHE` mode. |
179059
26
6949
45