Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "popsicle", | ||
"main": "popsicle.js", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"homepage": "https://github.com/blakeembrey/popsicle", | ||
@@ -6,0 +6,0 @@ "authors": [ |
{ | ||
"name": "popsicle", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Simple HTTP requests for node and the browser", | ||
@@ -5,0 +5,0 @@ "main": "popsicle.js", |
(function (root) { | ||
var isNode = typeof window === 'undefined'; | ||
var Buffer = isNode ? require('buffer').Buffer : null; | ||
var FormData = isNode ? require('form-data') : root.FormData; | ||
var FormData = isNode ? require('form-data') : window.FormData; | ||
@@ -217,10 +217,10 @@ var _hasOwnProperty = Object.prototype.hasOwnProperty; | ||
function getXHR () { | ||
if (root.XMLHttpRequest) { | ||
return new root.XMLHttpRequest(); | ||
if (window.XMLHttpRequest) { | ||
return new window.XMLHttpRequest(); | ||
} | ||
try { return new root.ActiveXObject('Microsoft.XMLHTTP'); } catch (e) {} | ||
try { return new root.ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch (e) {} | ||
try { return new root.ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch (e) {} | ||
try { return new root.ActiveXObject('Msxml2.XMLHTTP'); } catch (e) {} | ||
try { return new window.ActiveXObject('Microsoft.XMLHTTP'); } catch (e) {} | ||
try { return new window.ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch (e) {} | ||
try { return new window.ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch (e) {} | ||
try { return new window.ActiveXObject('Msxml2.XMLHTTP'); } catch (e) {} | ||
@@ -253,3 +253,3 @@ throw new Error('XMLHttpRequest is not available'); | ||
return encodeURIComponent(str) | ||
.replace(/[!'()]/g, root.escape) | ||
.replace(/[!'()]/g, escape) | ||
.replace(/\*/g, '%2A'); | ||
@@ -256,0 +256,0 @@ } catch (e) { |
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
68921