Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-it

Package Overview
Dependencies
Maintainers
1
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-it - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

lib/request/node-request.js

@@ -130,3 +130,3 @@ 'use strict';

var bodyIsStream = isStream(options.body);
var length = options.bodySize || (bodyIsStream ? null : options.body.length);
var length = options.bodySize || (bodyIsStream ? null : Buffer.byteLength(options.body));
if (!length) {

@@ -133,0 +133,0 @@ return bodyIsStream ? { bodyStream: options.body } : {};

{
"name": "get-it",
"version": "1.0.1",
"version": "1.0.2",
"description": "Generic HTTP request library for node and browsers",

@@ -78,2 +78,3 @@ "main": "lib/index.js",

"eslint-config-sanity": "^2.0.1",
"get-uri": "^2.0.0",
"gzip-size": "^3.0.0",

@@ -80,0 +81,0 @@ "karma": "^1.3.0",

@@ -30,2 +30,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getIt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

"use strict";exports.base=require("./base"),exports.debug=require("./debug"),exports.jsonRequest=require("./jsonRequest"),exports.jsonResponse=require("./jsonResponse"),exports.httpErrors=require("./httpErrors"),exports.retry=require("./retry"),exports.promise=require("./promise"),exports.observable=require("./observable"),exports.progress=require("./progress"),exports.headers=require("./headers");
},{"./base":3,"./debug":7,"./headers":9,"./httpErrors":10,"./jsonRequest":12,"./jsonResponse":13,"./observable":14,"./progress":16,"./promise":17,"./retry":18}],12:[function(require,module,exports){

@@ -66,4 +67,6 @@ "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},objectAssign=require("object-assign"),isPlainObject=require("is-plain-object"),serializeTypes=["boolean","string","number"],isBuffer=function(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)};module.exports=function(){return{processOptions:function(e){var o=e.body,t=o&&!isBuffer(o)&&(serializeTypes.indexOf("undefined"==typeof o?"undefined":_typeof(o))!==-1||Array.isArray(o)||isPlainObject(o)||o&&"function"==typeof o.toJSON);return t?objectAssign({},e,{body:JSON.stringify(e.body),headers:objectAssign({},e.headers,{"Content-Type":"application/json"})}):e}}};

"use strict";module.exports=Error.captureStackTrace||function(r){var e=new Error;Object.defineProperty(r,"stack",{configurable:!0,get:function(){var r=e.stack;return Object.defineProperty(this,"stack",{value:r}),r}})};
},{}],25:[function(require,module,exports){
"use strict";function inherits(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}var captureStackTrace=require("capture-stack-trace");module.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(/[^0-9a-zA-Z_$]/.test(e))throw new Error("className contains invalid characters");t=t||function(e){this.message=e};var r=function(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),captureStackTrace(this,this.constructor),t.apply(this,arguments)};return inherits(r,Error),r};
},{"capture-stack-trace":24}],26:[function(require,module,exports){

@@ -83,2 +86,3 @@ (function (process){

"use strict";function isObjectObject(t){return isObject(t)===!0&&"[object Object]"===Object.prototype.toString.call(t)}var isObject=require("isobject");module.exports=function(t){var e,c;return isObjectObject(t)!==!1&&(e=t.constructor,"function"==typeof e&&(c=e.prototype,isObjectObject(c)!==!1&&c.hasOwnProperty("isPrototypeOf")!==!1))};
},{"isobject":31}],31:[function(require,module,exports){

@@ -88,3 +92,2 @@ "use strict";module.exports=function(r){return null!=r&&"object"==typeof r&&!Array.isArray(r)};

function parse(e){if(e=String(e),!(e.length>1e4)){var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(r){var a=parseFloat(r[1]),n=(r[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return a*y;case"days":case"day":case"d":return a*d;case"hours":case"hour":case"hrs":case"hr":case"h":return a*h;case"minutes":case"minute":case"mins":case"min":case"m":return a*m;case"seconds":case"second":case"secs":case"sec":case"s":return a*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function fmtShort(e){return e>=d?Math.round(e/d)+"d":e>=h?Math.round(e/h)+"h":e>=m?Math.round(e/m)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function fmtLong(e){return plural(e,d,"day")||plural(e,h,"hour")||plural(e,m,"minute")||plural(e,s,"second")||e+" ms"}function plural(s,e,r){if(!(s<e))return s<1.5*e?Math.floor(s/e)+" "+r:Math.ceil(s/e)+" "+r+"s"}var s=1e3,m=60*s,h=60*m,d=24*h,y=365.25*d;module.exports=function(s,e){e=e||{};var r=typeof s;if("string"===r&&s.length>0)return parse(s);if("number"===r&&isNaN(s)===!1)return e.long?fmtLong(s):fmtShort(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};
},{}],33:[function(require,module,exports){

@@ -95,9 +98,6 @@ module.exports=function(){function n(n){return r.push(n),function(){var u=r.indexOf(n);u>-1&&r.splice(u,1)}}function u(){for(var n=0;n<r.length;n++)r[n].apply(null,arguments)}var r=[];return{subscribe:n,publish:u}};

"use strict";function toObject(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;var n=Object.getOwnPropertyNames(r).map(function(e){return r[e]});if("0123456789"!==n.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=shouldUseNative()?Object.assign:function(e,r){for(var t,n,o=toObject(e),a=1;a<arguments.length;a++){t=Object(arguments[a]);for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);if(Object.getOwnPropertySymbols){n=Object.getOwnPropertySymbols(t);for(var s=0;s<n.length;s++)propIsEnumerable.call(t,n[s])&&(o[n[s]]=t[n[s]])}}return o};
},{}],35:[function(require,module,exports){
var trim=require("trim"),forEach=require("for-each"),isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)};module.exports=function(r){if(!r)return{};var e={};return forEach(trim(r).split("\n"),function(r){var t=r.indexOf(":"),i=trim(r.slice(0,t)).toLowerCase(),o=trim(r.slice(t+1));"undefined"==typeof e[i]?e[i]=o:isArray(e[i])?e[i].push(o):e[i]=[e[i],o]}),e};
},{"for-each":28,"trim":41}],36:[function(require,module,exports){
function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}var process=module.exports={},cachedSetTimeout,cachedClearTimeout;!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var queue=[],draining=!1,currentQueue,queueIndex=-1;process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)t[u-1]=arguments[u];queue.push(new Item(e,t)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};
},{}],37:[function(require,module,exports){

@@ -108,6 +108,9 @@ "use strict";function querystring(e){for(var r,n=/([^=?&]+)=?([^&]*)/g,t={};r=n.exec(e);t[decodeURIComponent(r[1])]=decodeURIComponent(r[2]));return t}function querystringify(e,r){r=r||"";var n=[];"string"!=typeof r&&(r="?");for(var t in e)has.call(e,t)&&n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.length?r+n.join("&"):""}var has=Object.prototype.hasOwnProperty;exports.stringify=querystringify,exports.parse=querystring;

"use strict";module.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};
},{}],39:[function(require,module,exports){
"use strict";var url=require("url");module.exports=function(o,r,t){if(o===r)return!0;var p=url.parse(o,!1,!0),e=url.parse(r,!1,!0),s=0|p.port||("https"===p.protocol?443:80),u=0|e.port||("https"===e.protocol?443:80),l={proto:p.protocol===e.protocol,hostname:p.hostname===e.hostname,port:s===u};return l.proto&&l.hostname&&(l.port||t)};
},{"url":40}],40:[function(require,module,exports){
"use strict";var regex=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;module.exports={regex:regex,parse:function(e){var o=regex.exec(e);return o?{protocol:(o[1]||"").toLowerCase()||void 0,hostname:(o[5]||"").toLowerCase()||void 0,port:o[6]||void 0}:{}}};
},{}],41:[function(require,module,exports){

@@ -114,0 +117,0 @@ function trim(r){return r.replace(/^\s*|\s*$/g,"")}exports=module.exports=trim,exports.left=function(r){return r.replace(/^\s*/,"")},exports.right=function(r){return r.replace(/\s*$/,"")};

@@ -8,3 +8,2 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.getIt = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

"use strict";var sameOrigin=require("same-origin"),parseHeaders=require("parse-headers"),noop=function(){},win=window,XmlHttpRequest=win.XMLHttpRequest||noop,hasXhr2="withCredentials"in new XmlHttpRequest,XDomainRequest=hasXhr2?XmlHttpRequest:win.XDomainRequest,adapter="xhr";module.exports=function(e,t){function r(){w=!0,p.abort()}function n(t){q=!0,p.abort();var r=new Error("ESOCKETTIMEDOUT"===t?"Socket timed out on request to "+c.url:"Connection timed out on request to "+c.url);r.code=t,e.channels.error.publish(r)}function o(){X&&(s(),l.socket=setTimeout(function(){return n("ESOCKETTIMEDOUT")},X.socket))}function s(){(w||p.readyState>=2&&l.connect)&&clearTimeout(l.connect),l.socket&&clearTimeout(l.socket)}function a(){if(!h){s(),h=!0,p=null;var e=new Error("Network error while attempting to reach "+c.url);e.isNetworkError=!0,e.request=c,t(e)}}function i(){var e=p.status,t=p.statusText;if(f&&void 0===e)e=200;else{if(e>12e3&&e<12156)return a();e=1223===p.status?204:p.status,t=1223===p.status?"No Content":t}return{body:p.response||p.responseText,url:c.url,method:c.method,headers:f?{}:parseHeaders(p.getAllResponseHeaders()),statusCode:e,statusMessage:t}}function u(){if(!(w||h||q)){if(0===p.status)return void a(new Error("Unknown XHR error"));s(),h=!0,t(null,i())}}var c=e.options,d=!sameOrigin(win.location.href,c.url),l={},p=d?new XDomainRequest:new XmlHttpRequest,f=win.XDomainRequest&&p instanceof win.XDomainRequest,m=c.headers,w=!1,h=!1,q=!1;p.onerror=a,p.ontimeout=a,p.onabort=function(){w=!0},p.onprogress=function(){};var R=f?"onload":"onreadystatechange";if(p[R]=function(){o(),w||4!==p.readyState&&!f||0!==p.status&&u()},p.open(c.method,c.url,!0),p.withCredentials=!!c.withCredentials,m&&p.setRequestHeader)for(var T in m)m.hasOwnProperty(T)&&p.setRequestHeader(T,m[T]);else if(m&&f)throw new Error("Headers cannot be set on an XDomainRequest object");c.rawBody&&(p.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:c,adapter:adapter,request:p,context:e}),p.send(c.body||null);var X=c.timeout;return X&&(l.connect=setTimeout(function(){return n("ETIMEDOUT")},X.connect)),{abort:r}};
},{"parse-headers":10,"same-origin":13}],4:[function(require,module,exports){

@@ -27,2 +26,3 @@ "use strict";module.exports=require("./node-request");

"use strict";function querystring(e){for(var r,n=/([^=?&]+)=?([^&]*)/g,t={};r=n.exec(e);t[decodeURIComponent(r[1])]=decodeURIComponent(r[2]));return t}function querystringify(e,r){r=r||"";var n=[];"string"!=typeof r&&(r="?");for(var t in e)has.call(e,t)&&n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.length?r+n.join("&"):""}var has=Object.prototype.hasOwnProperty;exports.stringify=querystringify,exports.parse=querystring;
},{}],12:[function(require,module,exports){

@@ -36,3 +36,2 @@ "use strict";module.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e};

"use strict";var regex=/^(?:(?:(?:([^:\/#\?]+:)?(?:(?:\/\/)((?:((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((?:\/?(?:[^\/\?#]+\/+)*)(?:[^\?#]*)))?(\?[^#]+)?)(#.*)?/;module.exports={regex:regex,parse:function(e){var o=regex.exec(e);return o?{protocol:(o[1]||"").toLowerCase()||void 0,hostname:(o[5]||"").toLowerCase()||void 0,port:o[6]||void 0}:{}}};
},{}],15:[function(require,module,exports){

@@ -43,8 +42,8 @@ function trim(r){return r.replace(/^\s*|\s*$/g,"")}exports=module.exports=trim,exports.left=function(r){return r.replace(/^\s*/,"")},exports.right=function(r){return r.replace(/\s*$/,"")};

"use strict";function extractProtocol(o){var t=protocolre.exec(o);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function resolve(o,t){for(var e=(t||"/").split("/").slice(0,-1).concat(o.split("/")),r=e.length,s=e[r-1],a=!1,l=0;r--;)"."===e[r]?e.splice(r,1):".."===e[r]?(e.splice(r,1),l++):l&&(0===r&&(a=!0),e.splice(r,1),l--);return a&&e.unshift(""),"."!==s&&".."!==s||e.push(""),e.join("/")}function URL(o,t,e){if(!(this instanceof URL))return new URL(o,t,e);var r,s,a,l,n,c,h=rules.slice(),i=typeof t,p=this,u=0;for("object"!==i&&"string"!==i&&(e=t,t=null),e&&"function"!=typeof e&&(e=qs.parse),t=lolcation(t),s=extractProtocol(o||""),r=!s.protocol&&!s.slashes,p.slashes=s.slashes||r&&t.slashes,p.protocol=s.protocol||t.protocol||"",o=s.rest,s.slashes||(h[2]=[/(.*)/,"pathname"]);u<h.length;u++)l=h[u],a=l[0],c=l[1],a!==a?p[c]=o:"string"==typeof a?~(n=o.indexOf(a))&&("number"==typeof l[2]?(p[c]=o.slice(0,n),o=o.slice(n+l[2])):(p[c]=o.slice(n),o=o.slice(0,n))):(n=a.exec(o))&&(p[c]=n[1],o=o.slice(0,n.index)),p[c]=p[c]||(r&&l[3]?t[c]||"":""),l[4]&&(p[c]=p[c].toLowerCase());e&&(p.query=e(p.query)),r&&t.slashes&&"/"!==p.pathname.charAt(0)&&(""!==p.pathname||""!==t.pathname)&&(p.pathname=resolve(p.pathname,t.pathname)),required(p.port,p.protocol)||(p.host=p.hostname,p.port=""),p.username=p.password="",p.auth&&(l=p.auth.split(":"),p.username=l[0]||"",p.password=l[1]||""),p.origin=p.protocol&&p.host&&"file:"!==p.protocol?p.protocol+"//"+p.host:"null",p.href=p.toString()}var required=require("requires-port"),lolcation=require("./lolcation"),qs=require("querystringify"),protocolre=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,rules=[["#","hash"],["?","query"],["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]];URL.prototype.set=function(o,t,e){var r=this;switch(o){case"query":"string"==typeof t&&t.length&&(t=(e||qs.parse)(t)),r[o]=t;break;case"port":r[o]=t,required(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[o]="");break;case"hostname":r[o]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[o]=t,/:\d+$/.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!e;break;case"pathname":r.pathname=t.length&&"/"!==t.charAt(0)?"/"+t:t;break;default:r[o]=t}for(var s=0;s<rules.length;s++){var a=rules[s];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.origin=r.protocol&&r.host&&"file:"!==r.protocol?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},URL.prototype.toString=function(o){o&&"function"==typeof o||(o=qs.stringify);var t,e=this,r=e.protocol;r&&":"!==r.charAt(r.length-1)&&(r+=":");var s=r+(e.slashes?"//":"");return e.username&&(s+=e.username,e.password&&(s+=":"+e.password),s+="@"),s+=e.host+e.pathname,t="object"==typeof e.query?o(e.query):e.query,t&&(s+="?"!==t.charAt(0)?"?"+t:t),e.hash&&(s+=e.hash),s},URL.extractProtocol=extractProtocol,URL.location=lolcation,URL.qs=qs,module.exports=URL;
},{"./lolcation":17,"querystringify":11,"requires-port":12}],17:[function(require,module,exports){
(function (global){
"use strict";var slashes=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,ignore={hash:1,query:1},URL;module.exports=function(e){e=e||global.location||{},URL=URL||require("./");var s,o={},r=typeof e;if("blob:"===e.protocol)o=new URL(unescape(e.pathname),{});else if("string"===r){o=new URL(e,{});for(s in ignore)delete o[s]}else if("object"===r){for(s in e)s in ignore||(o[s]=e[s]);void 0===o.slashes&&(o.slashes=slashes.test(e.href))}return o};
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./":16}]},{},[1])(1)
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc