ipinfo
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -3,0 +3,0 @@ var request = require("jsonrequest"); |
{ | ||
"name": "ipinfo", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "An http://ipinfo.io NodeJS wrapper.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -82,29 +82,29 @@ <!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. --> | ||
console.log(err || cLoc); | ||
// { ip: '94. ... .77', | ||
// hostname: '... .com', | ||
// city: '...', | ||
// region: 'England', | ||
// country: 'GB', | ||
// loc: '5...,3...', | ||
// org: '... UK Limited', | ||
// postal: '...' } | ||
// { ip: "94. ... .77", | ||
// hostname: "... .com", | ||
// city: "...", | ||
// region: "England", | ||
// country: "GB", | ||
// loc: "5...,3...", | ||
// org: "... UK Limited", | ||
// postal: "..." } | ||
}); | ||
// Get information about a known ip | ||
ipInfo("8.8.8.8", (err, cLoc) => { | ||
console.log(err || cLoc); | ||
// { ip: '8.8.8.8', | ||
// hostname: 'google-public-dns-a.google.com', | ||
// city: 'Mountain View', | ||
// region: 'California', | ||
// country: 'US', | ||
// loc: '37.3845,-122.0881', | ||
// org: 'AS15169 Google Inc.', | ||
// postal: '94040' } | ||
// Get information about a known ip | ||
ipInfo("8.8.8.8", (err, cLoc) => { | ||
console.log(err || cLoc); | ||
// { ip: "8.8.8.8", | ||
// hostname: "google-public-dns-a.google.com", | ||
// city: "Mountain View", | ||
// region: "California", | ||
// country: "US", | ||
// loc: "37.3845,-122.0881", | ||
// org: "AS15169 Google Inc.", | ||
// postal: "94040" } | ||
}); | ||
// Get organization | ||
ipInfo("8.8.8.8/org", (err, cLoc) => { | ||
console.log(err || cLoc); | ||
// AS15169 Google Inc. | ||
}); | ||
}); | ||
// Get organization | ||
ipInfo("8.8.8.8/org", (err, cLoc) => { | ||
console.log(err || cLoc); | ||
// AS15169 Google Inc. | ||
}); | ||
@@ -111,0 +111,0 @@ ``` |
9108