get-ipinfo

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i get-ipinfo

Weekly Downloads

2,100

Version

1.0.0

License

MIT

Last publish

Collaborators

  • johnie