Socket
Socket
Sign inDemoInstall

ipgeolocation

Package Overview
Dependencies
1
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.7

19

index.js

@@ -11,4 +11,19 @@ exports.ipgeo = function(apiKey="",fields="",ip="") {

function request(subUrl=null, apiKey="",fields="",ip=""){
var URL = "";
if(apiKey){
URL = subUrl;
URL = URL + ("?apiKey=" + apiKey);
}
if(fields){
URL = URL + "&fields=";
URL = URL + fields;
}
if(ip){
URL = URL + "&ip=";
URL = URL + ip;
}
var data = null;
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var xhr = new XMLHttpRequest();

@@ -21,4 +36,4 @@ xhr.withCredentials = true;

});
xhr.open("GET", "https://api.ipgeolocation.io/"+subUrl+"?apiKey="+apiKey+"&fields="+fields+"&ip="+ip+"");
xhr.open("GET", "https://api.ipgeolocation.io/"+URL+"");
xhr.send(data);
}

2

package.json
{
"name": "ipgeolocation",
"version": "1.0.2",
"version": "1.0.7",
"description": "new pkg",

@@ -5,0 +5,0 @@ "main": "index.js",

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