ip2geolocation

1.0.0 • Public • Published

IP 2 Geo Location

Install

$ npm install ip2geolocation

Usage Example

import { ipApi } from 'ip2geolocation';
 
fetch(ipApi.getUrl())
  .then(res => res.json())
  .then(data => console.log(ipApi.parseData(data)));

Data Providers

Every data provider uses its own data format. To use an unified data format (see a sample below)

{
   "city" : "Mountain View",
   "countryCode" : "US",
   "lat" : 38.00881,
   "lon" : -122.11746,
   "ip" : "8.8.8.8"
}

use the parseData method.

/ip2geolocation/

    Package Sidebar

    Install

    npm i ip2geolocation

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.89 kB

    Total Files

    3

    Last publish

    Collaborators

    • elgin