Skip to content

bharathvaj-ganesan/ip-geoinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Built with Grunt Build Status Code Climate

ip-geoinfo

Get geolocation information about an IP Address using promise.

Installation

$ npm install ip-geoinfo --save

Dependencies

$ npm install require --save
$ npm install require-promise --save
$ npm install ip-regex --save

Usuage

var getgeoip = require('ip-geoinfo');
var ipAddress = '8.8.8.8';

getgeoip(ipAddress).then(function (geoData) {
    console.log(geoData);
    /*=>{ ip: '8.8.8.8',
            city: 'Mountain View',
            region: 'California',
            country: 'US',
            country_name: 'United States',
            postal: '94035',
            latitude: 37.386,
            longitude: -122.0838,
            timezone: 'America/Los_Angeles' }  */
});

Features

  • Returns geolocation information in JSON format.
  • Validates IP address (New)

License

MIT © Bharathvaj Ganesan

About

Get geolocation information about an IP Address using promise. 😃

Resources

License

Stars

Watchers

Forks

Packages

No packages published