Socket
Socket
Sign inDemoInstall

ip-geolocation-api-javascript-sdk

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.8 to 1.0.9

25

IPGeolocationAPI.js

@@ -28,3 +28,6 @@ var GeolocationParams = require('./GeolocationParams.js');

getUserAgent(callback, uaString ="") {
var jsonData = "{\"uaString\":\"" + uaString + "\"}";
var jsonData = JSON.stringify({
"uaString": uaString
});
postRequest('user-agent', "apiKey=" + this.apiKey, jsonData, callback);

@@ -34,12 +37,5 @@ }

getBulkUserAgent(callback, uaStrings = []) {
var jsonData = "{\"uaStrings\":[";
for(let i = 0; i < uaStrings.length; i++){
if(i === 0){
jsonData = jsonData.concat("\"" + uaStrings[i] + "\"");
} else{
jsonData = jsonData.concat(",");
jsonData = jsonData.concat("\"" + uaStrings[i] + "\"");
}
}
jsonData = jsonData.concat("]}");
var jsonData = JSON.stringify({
"uaStrings": uaStrings
});

@@ -101,2 +97,3 @@ postRequest('user-agent-bulk', "apiKey=" + this.apiKey, jsonData, callback);

var includeHost = false;
if (geolocationParams.isIncludeHostname()) {

@@ -112,2 +109,3 @@ val = "hostname";

}
if (geolocationParams.isIncludeSecurity()) {

@@ -120,2 +118,3 @@ if (includeHost) {

}
if (geolocationParams.isIncludeUserAgent()) {

@@ -128,5 +127,7 @@ if (includeHost || geolocationParams.isIncludeSecurity()) {

}
if (urlParams) {
urlParams = urlParams.concat('&');
}
urlParams = urlParams.concat('include=', val);

@@ -137,2 +138,3 @@

}
return urlParams;

@@ -177,2 +179,3 @@ }

}
urlParams = urlParams.concat('lat=', timezoneParams.getLatitude(), '&long=', timezoneParams.getLongitude());

@@ -179,0 +182,0 @@ }

{
"author": "ipgeolocation",
"author": "ipgeolocation.io",
"dependencies": {

@@ -26,3 +26,3 @@ "xmlhttprequest": "^1.8.0"

},
"version": "1.0.8",
"version": "1.0.9",
"devDependencies": {},

@@ -29,0 +29,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc