Fetch IP geolocation information and WhoIs data from ip.me
Go to file
aria f29adf47df
bump version, add git repo
2022-08-09 05:56:39 -04:00
.gitignore v1.0 2022-08-09 05:54:54 -04:00
package-lock.json v1.0 2022-08-09 05:54:54 -04:00
package.json bump version, add git repo 2022-08-09 05:56:39 -04:00
README.md v1.0 2022-08-09 05:54:54 -04:00
src.js v1.0 2022-08-09 05:54:54 -04:00
test.js v1.0 2022-08-09 05:54:54 -04:00

ip.me

Fetch IP geolocation information and WhoIs data from ip.me.

const ipme = require("ip.me");

(async function() {
  let userIp = await ipme.ip();
  console.log(`IP Information (Personal):`, userIp);

  let googleIp = await ipme.ip("8.8.8.8");
  console.log(`\n\nIP Information (Google DNS):`, googleIp);

  let whois = await ipme.whois("google.com");
  console.log(`\n\nWhois Information (google.com):\n\n`, whois);

  let whois2 = await ipme.whois("https://ip.me/");
  console.log(`\n\nWhois Information (ip.me):\n\n`, whois2);
})();