offline-geo-from-ip
v1.0.1
Published
Get geo location information from an IP address
Downloads
1,303
Maintainers
Readme
offline-geo-from-ip
Get geo location information from an IP address without an internet connection.
This is a modified version of geo-from-ip that includes a local database.
Installation
npm install --save offline-geo-from-ip
Usage
var geoIP = require('offline-geo-from-ip');
console.log(geoIP.allData('199.188.195.120'));
/*
{
code: { state: 'CA', country: 'US', continent: 'NA' },
city: 'San Francisco',
state: 'California',
country: 'United States',
continent: 'North America',
postal: '94103',
location:
{
accuracy_radius: 10,
latitude: 37.7758,
longitude: -122.4128,
metro_code: 807,
time_zone: 'America/Los_Angeles'
}
}
*/
Credits
Original version created by Vikram Tiwari
License
Licensed under MIT License