ip_details

0.1.5 • Public • Published

mathematica_logo


IP Address Details Build Status Coverage Status In Progress

Get all (almost) details of a particular IP address

Installation

npm install ip_details

Usage

var ipDetails = require('@pavanvamsi/ip_details');
 
ipDetails.getIp(function(ipAddress) {
    console.log(ipAddress) // Your IP Address
});
 
ipDetails.isValidIp('127.0.0.1'); // return true or false
 
ipDetails.getCity('8.8.8.8', function(city) {
    console.log(city); // Mountain View, California
});
 
ipDetails.getCountry('8.8.8.8', function(country) {
    console.log(country); // United States
});
 
ipDetails.getCountry('8.88.8', function(country) {
    console.log(country); // returns undefined because of invalid ip address
});
 

Tests

npm test

Like it? 🙈

⭐️ the repo and share.

Link to npm package

To do

  • Location (City, Country)
  • Pincode
  • Lat Long
  • Org

License

MIT Copyright (c) pavanvamsi


Powered by - http://ip-api.com

Readme

Keywords

none

Package Sidebar

Install

npm i ip_details

Weekly Downloads

6

Version

0.1.5

License

MIT

Last publish

Collaborators

  • pavanvamsi