Skip to content

A simple NPM package for get a lot of info about a IP address

Notifications You must be signed in to change notification settings

alejandromume/ip-info3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IP Info 3

d

Package: https://www.npmjs.com/package/ip-info3

Description

  • A simple package for get a lot of info about a IP address

Install

npm install ip-info3

Modules

  • GetAll() -> Get all the info
  • GetAS() -> Get the IP AS
  • GetCity() -> Get the IP City
  • GetCountry() -> Get the IP Country
  • GetCountryCode() -> Get the IP Country code
  • GetISP() -> Get the IP ISP
  • GetOrg() -> Get the IP Organization
  • GetRegion() -> Get the IP Region
  • GetRegionName() -> Get the IP Region name
  • GetQueryStatus() -> Get if the query was successfull
  • GetTimezone() -> Get the IP Timezone
  • GetZip() -> Get the IP zip

Examples

const IPInfo = require("ip-info3")
const getinfo = new IPInfo.getIPInfo();

getinfo.GetCity("90.90.90.90").then(data => {
    console.log(data)
});

Output

>> Paris

const IPInfo = require("ip-info3")
const getinfo = new IPInfo.getIPInfo();

getinfo.GetRegionName("90.90.90.90").then(data => {
    console.log(data)
});

Output

>> Île-de-France

const IPInfo = require("ip-info3")
const getinfo = new IPInfo.getIPInfo();

getinfo.GetAll("90.90.90.90").then(data => {
    console.log(data)
});

Output

>> {
   "status":"success",
   "country":"France",
   "countryCode":"FR",
   "region":"IDF",
   "regionName":"Île-de-France",
   "city":"Paris",
   "zip":"75018",
   "lat":48.8323,
   "lon":2.4075,
   "timezone":"Europe/Paris",
   "isp":"Orange S.A.",
   "org":"G-Core Labs",
   "as":"AS3215 Orange S.A.",
   "query":"90.90.90.90"
}

Releases

No releases published

Packages

No packages published