0.1.5 • Published 6 years ago

ip_details v0.1.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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? :see_no_evil:

:star: 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

0.1.5

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago