Comparing version 1.1.0 to 1.1.1
10
index.js
/*jslint node: true */ | ||
'use strict'; | ||
const rp = require('request-promise'); | ||
const ipGeoInfo = module.exports = function (ipAddress) { | ||
const rp = require('request-promise'), | ||
ipGeoInfo = module.exports = (ipAddress) => { | ||
@@ -15,7 +15,7 @@ if (/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ipAddress)) { | ||
return rp(req) | ||
.then(function (res) { | ||
.then( (res) => { | ||
return res; | ||
}) | ||
.catch(function (err) { | ||
console.log("Not valid ip"); | ||
.catch( (err) => { | ||
console.log("Timeout"); | ||
}); | ||
@@ -22,0 +22,0 @@ } else { |
{ | ||
"name": "ip-geoinfo", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Get geolocation information about an IP Address", | ||
@@ -10,2 +10,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"ip-regex": "^2.1.0", | ||
"request": "^2.81.0", | ||
@@ -31,3 +32,3 @@ "request-promise": "^4.2.1" | ||
"license": "MIT", | ||
"bugs": { | ||
"bugs": { | ||
"url": "https://github.com/bharathvaj1995/ip-geoinfo/issues" | ||
@@ -34,0 +35,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4405
3
+ Addedip-regex@^2.1.0
+ Addedip-regex@2.1.0(transitive)