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.0.1 to 0.0.2

examples/distance.js

8

lib/country.js

@@ -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.
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