npm install github:acodev/ip-analyzer-moduleImport 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();{
"ip": "8.8.8.8",
"isPrivate": false,
"class": "A",
"hostname": "dns.google",
"organization": "Google LLC",
"city": "Mountain View",
"region": "California",
"country": "US"
}