geotools
IP to Country/Region lookup module
Last updated 4 years ago by runk .
LGPL2.1 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install geotools 
SYNC missed versions from official npm registry.

geotools

Simple and fast IP to Country/Region lookup module for nodejs. Pull Requests are welcome!

GEO databases

You can download fresh geo database from this website: http://ipgeobase.ru/. Database contains major ranges for all countries worldwide and precise ranges for most Russian cities/regions. It could also be extended with other generic geo data.

Installation

npm install geotools

Usage

var geo = require('geotools');
var res = geo.lookup('87.229.134.24');
/**
  * Output is: 
  * {
  *    country: 'RU',
  *    region: 1056,
  *    city: 'Березовский',
  *    regionName: 'Свердловская область',
  *    district: 'Уральский федеральный округ',
  *    lat: '56.912811',
  *    lon: '60.804699'
  *  }
 */

Speed / Benchmark

Approximate speed on average laptop is about 1.5M calls per second. Benchmark is simple, but it gives you an idea about module's performance. Test it yourself:

node ./lib/bench.js

Current Tags

  • 0.1.0                                ...           latest (4 years ago)

7 Versions

  • 0.1.0                                ...           4 years ago
  • 0.0.6                                ...           7 years ago
  • 0.0.5                                ...           8 years ago
  • 0.0.4                                ...           8 years ago
  • 0.0.3                                ...           8 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 3
Dependencies (0)
None
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |