Socket
Socket
Sign inDemoInstall

ipinfo

Package Overview
Dependencies
10
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.0 to 1.4.1

2

lib/index.js

@@ -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 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc