Get IP info using ipinfo.io
JavaScript
Latest commit 45ddc81 Jan 17, 2015 @johnie johnie Cleaned up
Permalink
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.jshintrc
.travis.yml
LICENSE-MIT First commit Jan 14, 2015
README.md
cli.js
index.js
package.json

README.md

get-ipinfo

Get IP info using ipinfo.io

Install

$ npm install --save get-ipinfo

Usage

var IPinfo = require('get-ipinfo');

/**
 * Get your IP info
 */

IPinfo(function(err, ip) {
  console.log(ip);
});

/**
 * Get defined IP info
 */

IPinfo('1.3.3.7', function(err, ip) {
  console.log(ip);
});

CLI

$ npm install --global get-ipinfo
$ ipinfo --help

  Usage
    $ ipinfo

    {
      "ip": "90.111.11.111"
      "hostname": "Hostname"
      "city": "Stockholm"
      "region": "Stockholms Lan"
      "country": "SE"
      "loc": "59.32932318.068581"
      "org": "Adroiter AB"
      "postal": "1337"
    }

  Example
    $ ipinfo --ip 1.3.3.7
    $ ipinfo --type country

  Options
    --ip    Specify an IP address
    --type  Type of information: ip|hostname|city|region|country|loc|org|postal

License

MIT © Adroiter