AcoDev/ip-analyzer-module

A Node.js module to analyze IP addresses for geolocation, private ranges, and IP class.

โ˜… 0Forks 0JavaScriptGitHub โ†—Compare

README

IP Analyzer Module

๐Ÿš€ Installation

npm install github:acodev/ip-analyzer-module

Usage

Import the module and use the main function to analyze an IP address:

import { analyzeIP } from "@acodev/ip-analyzer-module";

async function run() {
  const ip = "8.8.8.8";
  const result = await analyzeIP(ip);
  console.log(result);
}

run();

Example

{
  "ip": "8.8.8.8",
  "isPrivate": false,
  "class": "A",
  "hostname": "dns.google",
  "organization": "Google LLC",
  "city": "Mountain View",
  "region": "California",
  "country": "US"
}

Contributors

AcoDev

Issues