Socket
Socket
Sign inDemoInstall

uri-js

Package Overview
Dependencies
1
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

4

dist/es5/uri.all.js

@@ -1,2 +0,2 @@

/** @license URI.js v3.0.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
/** @license URI.js v3.0.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
(function (global, factory) {

@@ -727,3 +727,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :

var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;
var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;

@@ -730,0 +730,0 @@ function parse(uriString) {

@@ -1,3 +0,3 @@

/** @license URI.js v3.0.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return e===undefined?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return e!==undefined&&null!==e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e){var n=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+t("%[89A-Fa-f]"+n+"%"+n+n)+"|"+t("%"+n+n)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",a),u=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",s=e?"[\\uE000-\\uF8FF]":"[]",p=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",u),f=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("[1-9][0-9]")+"|[0-9]"),c=t(f+"\\."+f+"\\."+f+"\\."+f),h=t(n+"{1,4}"),d=t(t(h+"\\:"+h)+"|"+c),l=t(t(h+"\\:")+"{6}"+d),g=t("\\:\\:"+t(h+"\\:")+"{5}"+d),m=t(t(h)+"?\\:\\:"+t(h+"\\:")+"{4}"+d),v=t(t(t(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+t(h+"\\:")+"{3}"+d),E=t(t(t(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+t(h+"\\:")+"{2}"+d),C=t(t(t(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),y=t(t(t(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),S=t(t(t(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),A=t(t(t(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),D=t([l,g,m,v,E,C,y,S,A].join("|"));return{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",p,a),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",p,a),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",p,a),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",p,a),"g"),NOT_QUERY:new RegExp(r("[^\\%]",p,a,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",p,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",p,a),"g"),UNRESERVED:new RegExp(p,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",p,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV6ADDRESS:new RegExp("\\[?("+D+")\\]?","g")}}function u(e){throw new RangeError(R[e])}function s(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function p(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,"."),n+s(e.split("."),r).join(".")}function f(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}function c(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function h(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),u=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function d(e,r){function t(e){var t=h(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,c).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,c).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,c).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,c).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,c).replace(r.PCT_ENCODED,o)),e}function l(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},t={},n=r.iri!==!1?w:x;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(k);if(o){G?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||undefined,t.userinfo=e.indexOf("@")!==-1?o[3]:undefined,t.host=e.indexOf("//")!==-1?o[4]:undefined,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=e.indexOf("?")!==-1?o[7]:undefined,t.fragment=e.indexOf("#")!==-1?o[8]:undefined,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),t.host&&(t.host=t.host.replace(n.IPV6ADDRESS,"$1")),t.scheme!==undefined||t.userinfo!==undefined||t.host!==undefined||t.port!==undefined||t.path||t.query!==undefined?t.scheme===undefined?t.reference="relative":t.fragment===undefined?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=V[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)d(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=Z.toASCII(t.host.replace(n.PCT_ENCODED,h).toLowerCase())}catch(i){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+i}d(t,x)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function g(e,r){var t=r.iri!==!1?w:x,n=[];return e.userinfo!==undefined&&(n.push(e.userinfo),n.push("@")),e.host!==undefined&&n.push(String(e.host).replace(t.IPV6ADDRESS,"[$1]")),"number"==typeof e.port&&(n.push(":"),n.push(e.port.toString(10))),n.length?n.join(""):undefined}function m(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(B))e=e.replace(B,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(J);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function v(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},t=r.iri?w:x,n=[],o=V[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?Z.toUnicode(e.host):Z.toASCII(e.host.replace(t.PCT_ENCODED,h).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}d(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=g(e,r);if(a!==undefined&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=m(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return e.query!==undefined&&(n.push("?"),n.push(e.query)),e.fragment!==undefined&&(n.push("#"),n.push(e.fragment)),n.join("")}function E(e,r){var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},n=arguments[3],o={};return n||(e=l(v(e,t),t),r=l(v(r,t),t)),t=t||{},!t.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=m(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=m(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=m(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=m(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function C(e,r,t){return v(E(l(e,t),l(r,t),t,!0),t)}function y(e,r){return"string"==typeof e?e=v(l(e,r),r):"object"===n(e)&&(e=l(v(e,r),r)),e}function S(e,r,t){return"string"==typeof e?e=v(l(e,t),t):"object"===n(e)&&(e=v(e,t)),"string"==typeof r?r=v(l(r,t),t):"object"===n(r)&&(r=v(r,t)),e===r}function A(e,r){return e&&e.toString().replace(r&&r.iri?w.ESCAPE:x.ESCAPE,c)}function D(e,r){return e&&e.toString().replace(r&&r.iri?w.PCT_ENCODED:x.PCT_ENCODED,h)}function F(e){var r=h(e);return r.match(oe)?r:e}var x=i(!1),w=i(!0),O=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},b=2147483647,N=/^xn--/,I=/[^\0-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,P=String.fromCharCode,U=function(e){return String.fromCodePoint.apply(String,O(e))},q=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},H=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},j=function(e,r,t){var n=0;for(e=t?_(e/700):e>>1,e+=_(e/r);e>455;n+=36)e=_(e/35);return _(n+36*e/(e+38))},z=function(e){var r=[],t=e.length,n=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&u("not-basic"),r.push(e.charCodeAt(s));for(var p=i>0?i+1:0;p<t;){for(var f=n,c=1,h=36;;h+=36){p>=t&&u("invalid-input");var d=q(e.charCodeAt(p++));(d>=36||d>_((b-n)/c))&&u("overflow"),n+=d*c;var l=h<=a?1:h>=a+26?26:h-a;if(d<l)break;var g=36-l;c>_(b/g)&&u("overflow"),c*=g}var m=r.length+1;a=j(n-f,m,0==f),_(n/m)>b-o&&u("overflow"),o+=_(n/m),n%=m,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},L=function(e){var r=[];e=f(e);var t=e.length,n=128,o=0,a=72,i=!0,s=!1,p=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(P(d))}}catch(L){s=!0,p=L}finally{try{!i&&h["return"]&&h["return"]()}finally{if(s)throw p}}var l=r.length,g=l;for(l&&r.push("-");g<t;){var m=b,v=!0,E=!1,C=undefined;try{for(var y,S=e[Symbol.iterator]();!(v=(y=S.next()).done);v=!0){var A=y.value;A>=n&&A<m&&(m=A)}}catch(L){E=!0,C=L}finally{try{!v&&S["return"]&&S["return"]()}finally{if(E)throw C}}var D=g+1;m-n>_((b-o)/D)&&u("overflow"),o+=(m-n)*D,n=m;var F=!0,x=!1,w=undefined;try{for(var O,N=e[Symbol.iterator]();!(F=(O=N.next()).done);F=!0){var I=O.value;if(I<n&&++o>b&&u("overflow"),I==n){for(var T=o,R=36;;R+=36){var U=R<=a?1:R>=a+26?26:R-a;if(T<U)break;var q=T-U,z=36-U;r.push(P(H(U+q%z,0))),T=_(q/z)}r.push(P(H(T,0))),a=j(o,D,g==l),o=0,++g}}}catch(L){x=!0,w=L}finally{try{!F&&N["return"]&&N["return"]()}finally{if(x)throw w}}++o,++n}return r.join("")},$=function(e){return p(e,function(e){return N.test(e)?z(e.slice(4).toLowerCase()):e})},M=function(e){return p(e,function(e){return I.test(e)?"xn--"+L(e):e})},Z={version:"2.1.0",ucs2:{decode:f,encode:U},decode:z,encode:L,toASCII:M,toUnicode:$},V={},k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i,G="".match(/(){0}/)[1]===undefined,Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,B=/^\/\.\.(\/|$)/,J=/^\/?(?:.|\n)*?(?=\/|$)/,K={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=undefined),e.path||(e.path="/"),e}},W={scheme:"https",domainHost:K.domainHost,parse:K.parse,serialize:K.serialize},X={},ee="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",re="[0-9A-Fa-f]",te=t(t("%[EFef][0-9A-Fa-f]%"+re+re+"%"+re+re)+"|"+t("%[89A-Fa-f][0-9A-Fa-f]%"+re+re)+"|"+t("%"+re+re)),ne=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),oe=new RegExp(ee,"g"),ae=new RegExp(te,"g"),ie=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ne),"g"),ue=new RegExp(r("[^]",ee,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),se=ue,pe={scheme:"mailto",parse:function(e,r){var t=e.to=e.path?e.path.split(","):[];if(e.path=undefined,e.query){for(var n=!1,o={},a=e.query.split("&"),i=0,u=a.length;i<u;++i){var s=a[i].split("=");switch(s[0]){case"to":for(var p=s[1].split(","),f=0,c=p.length;f<c;++f)t.push(p[f]);break;case"subject":e.subject=D(s[1],r);break;case"body":e.body=D(s[1],r);break;default:n=!0,o[D(s[0],r)]=D(s[1],r)}}n&&(e.headers=o)}e.query=undefined;for(var h=0,d=t.length;h<d;++h){var l=t[h].split("@");if(l[0]=D(l[0]),r.unicodeSupport)l[1]=D(l[1],r).toLowerCase();else try{l[1]=Z.toASCII(D(l[1],r).toLowerCase())}catch(g){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+g}t[h]=l.join("@")}return e},serialize:function(e,r){var t=a(e.to);if(t){for(var n=0,i=t.length;n<i;++n){var u=String(t[n]),s=u.lastIndexOf("@"),p=u.slice(0,s).replace(ae,F).replace(ae,o).replace(ie,c),f=u.slice(s+1);try{f=r.iri?Z.toUnicode(f):Z.toASCII(D(f,r).toLowerCase())}catch(g){e.error=e.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+g}t[n]=p+"@"+f}e.path=t.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var d=[];for(var l in h)h[l]!==X[l]&&d.push(l.replace(ae,F).replace(ae,o).replace(ue,c)+"="+h[l].replace(ae,F).replace(ae,o).replace(se,c));return d.length&&(e.query=d.join("&")),e}},fe=new RegExp("^urn\\:((?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31}))$"),ce={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(/^([^\:]+)\:(.*)/);if(t){var n="urn:"+t[1].toLowerCase(),o=V[n];o||(o=V[n]={scheme:n,parse:function(e,r){return e},serialize:V.urn.serialize}),e.scheme=n,e.path=t[2],e=o.parse(e,r)}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,r){var t=e.scheme||r.scheme;if(t&&"urn"!==t){var n=t.match(fe)||["urn:"+t,t];e.scheme="urn",e.path=n[1]+":"+(e.path?e.path.replace(/[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g,c):"")}return e}},he=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,de={scheme:"urn:uuid",parse:function(e,r){return r.tolerant||e.path&&e.path.match(he)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,r){return r.tolerant||e.path&&e.path.match(he)?e.path=(e.path||"").toLowerCase():e.scheme=undefined,V.urn.serialize(e,r)}};V.http=K,V.https=W,V.mailto=pe,V.urn=ce,V["urn:uuid"]=de,e.SCHEMES=V,e.pctEncChar=c,e.pctDecChars=h,e.parse=l,e.removeDotSegments=m,e.serialize=v,e.resolveComponents=E,e.resolve=C,e.normalize=y,e.equal=S,e.escapeComponent=A,e.unescapeComponent=D,Object.defineProperty(e,"__esModule",{value:!0})});
/** @license URI.js v3.0.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.URI=e.URI||{})}(this,function(e){"use strict";function r(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];if(r.length>1){r[0]=r[0].slice(0,-1);for(var n=r.length-1,o=1;o<n;++o)r[o]=r[o].slice(1,-1);return r[n]=r[n].slice(1),r.join("")}return r[0]}function t(e){return"(?:"+e+")"}function n(e){return e===undefined?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function o(e){return e.toUpperCase()}function a(e){return e!==undefined&&null!==e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function i(e){var n=r("[0-9]","[A-Fa-f]"),o=t(t("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+t("%[89A-Fa-f]"+n+"%"+n+n)+"|"+t("%"+n+n)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",i=r("[\\:\\/\\?\\#\\[\\]\\@]",a),u=e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",s=e?"[\\uE000-\\uF8FF]":"[]",p=r("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",u),f=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("[1-9][0-9]")+"|[0-9]"),c=t(f+"\\."+f+"\\."+f+"\\."+f),h=t(n+"{1,4}"),d=t(t(h+"\\:"+h)+"|"+c),l=t(t(h+"\\:")+"{6}"+d),g=t("\\:\\:"+t(h+"\\:")+"{5}"+d),m=t(t(h)+"?\\:\\:"+t(h+"\\:")+"{4}"+d),v=t(t(t(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+t(h+"\\:")+"{3}"+d),E=t(t(t(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+t(h+"\\:")+"{2}"+d),C=t(t(t(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+d),y=t(t(t(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+d),S=t(t(t(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),A=t(t(t(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),D=t([l,g,m,v,E,C,y,S,A].join("|"));return{NOT_SCHEME:new RegExp(r("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(r("[^\\%\\:]",p,a),"g"),NOT_HOST:new RegExp(r("[^\\%\\[\\]\\:]",p,a),"g"),NOT_PATH:new RegExp(r("[^\\%\\/\\:\\@]",p,a),"g"),NOT_PATH_NOSCHEME:new RegExp(r("[^\\%\\/\\@]",p,a),"g"),NOT_QUERY:new RegExp(r("[^\\%]",p,a,"[\\:\\@\\/\\?]",s),"g"),NOT_FRAGMENT:new RegExp(r("[^\\%]",p,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(r("[^]",p,a),"g"),UNRESERVED:new RegExp(p,"g"),OTHER_CHARS:new RegExp(r("[^\\%]",p,i),"g"),PCT_ENCODED:new RegExp(o,"g"),IPV6ADDRESS:new RegExp("\\[?("+D+")\\]?","g")}}function u(e){throw new RangeError(R[e])}function s(e,r){for(var t=[],n=e.length;n--;)t[n]=r(e[n]);return t}function p(e,r){var t=e.split("@"),n="";return t.length>1&&(n=t[0]+"@",e=t[1]),e=e.replace(T,"."),n+s(e.split("."),r).join(".")}function f(e){for(var r=[],t=0,n=e.length;t<n;){var o=e.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){var a=e.charCodeAt(t++);56320==(64512&a)?r.push(((1023&o)<<10)+(1023&a)+65536):(r.push(o),t--)}else r.push(o)}return r}function c(e){var r=e.charCodeAt(0);return r<16?"%0"+r.toString(16).toUpperCase():r<128?"%"+r.toString(16).toUpperCase():r<2048?"%"+(r>>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function h(e){for(var r="",t=0,n=e.length;t<n;){var o=parseInt(e.substr(t+1,2),16);if(o<128)r+=String.fromCharCode(o),t+=3;else if(o>=194&&o<224){if(n-t>=6){var a=parseInt(e.substr(t+4,2),16);r+=String.fromCharCode((31&o)<<6|63&a)}else r+=e.substr(t,6);t+=6}else if(o>=224){if(n-t>=9){var i=parseInt(e.substr(t+4,2),16),u=parseInt(e.substr(t+7,2),16);r+=String.fromCharCode((15&o)<<12|(63&i)<<6|63&u)}else r+=e.substr(t,9);t+=9}else r+=e.substr(t,3),t+=3}return r}function d(e,r){function t(e){var t=h(e);return t.match(r.UNRESERVED)?t:e}return e.scheme&&(e.scheme=String(e.scheme).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_SCHEME,"")),e.userinfo!==undefined&&(e.userinfo=String(e.userinfo).replace(r.PCT_ENCODED,t).replace(r.NOT_USERINFO,c).replace(r.PCT_ENCODED,o)),e.host!==undefined&&(e.host=String(e.host).replace(r.PCT_ENCODED,t).toLowerCase().replace(r.NOT_HOST,c).replace(r.PCT_ENCODED,o)),e.path!==undefined&&(e.path=String(e.path).replace(r.PCT_ENCODED,t).replace(e.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,c).replace(r.PCT_ENCODED,o)),e.query!==undefined&&(e.query=String(e.query).replace(r.PCT_ENCODED,t).replace(r.NOT_QUERY,c).replace(r.PCT_ENCODED,o)),e.fragment!==undefined&&(e.fragment=String(e.fragment).replace(r.PCT_ENCODED,t).replace(r.NOT_FRAGMENT,c).replace(r.PCT_ENCODED,o)),e}function l(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},t={},n=r.iri!==!1?w:x;"suffix"===r.reference&&(e=(r.scheme?r.scheme+":":"")+"//"+e);var o=e.match(k);if(o){G?(t.scheme=o[1],t.userinfo=o[3],t.host=o[4],t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=o[7],t.fragment=o[8],isNaN(t.port)&&(t.port=o[5])):(t.scheme=o[1]||undefined,t.userinfo=e.indexOf("@")!==-1?o[3]:undefined,t.host=e.indexOf("//")!==-1?o[4]:undefined,t.port=parseInt(o[5],10),t.path=o[6]||"",t.query=e.indexOf("?")!==-1?o[7]:undefined,t.fragment=e.indexOf("#")!==-1?o[8]:undefined,isNaN(t.port)&&(t.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined)),t.host&&(t.host=t.host.replace(n.IPV6ADDRESS,"$1")),t.scheme!==undefined||t.userinfo!==undefined||t.host!==undefined||t.port!==undefined||t.path||t.query!==undefined?t.scheme===undefined?t.reference="relative":t.fragment===undefined?t.reference="absolute":t.reference="uri":t.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==t.reference&&(t.error=t.error||"URI is not a "+r.reference+" reference.");var a=V[(r.scheme||t.scheme||"").toLowerCase()];if(r.unicodeSupport||a&&a.unicodeSupport)d(t,n);else{if(t.host&&(r.domainHost||a&&a.domainHost))try{t.host=Z.toASCII(t.host.replace(n.PCT_ENCODED,h).toLowerCase())}catch(i){t.error=t.error||"Host's domain name can not be converted to ASCII via punycode: "+i}d(t,x)}a&&a.parse&&a.parse(t,r)}else t.error=t.error||"URI can not be parsed.";return t}function g(e,r){var t=r.iri!==!1?w:x,n=[];return e.userinfo!==undefined&&(n.push(e.userinfo),n.push("@")),e.host!==undefined&&n.push(String(e.host).replace(t.IPV6ADDRESS,"[$1]")),"number"==typeof e.port&&(n.push(":"),n.push(e.port.toString(10))),n.length?n.join(""):undefined}function m(e){for(var r=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Y))e=e.replace(Y,"/");else if(e.match(B))e=e.replace(B,"/"),r.pop();else if("."===e||".."===e)e="";else{var t=e.match(J);if(!t)throw new Error("Unexpected dot segment condition");var n=t[0];e=e.slice(n.length),r.push(n)}return r.join("")}function v(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},t=r.iri?w:x,n=[],o=V[(r.scheme||e.scheme||"").toLowerCase()];if(o&&o.serialize&&o.serialize(e,r),e.host)if(t.IPV6ADDRESS.test(e.host));else if(r.domainHost||o&&o.domainHost)try{e.host=r.iri?Z.toUnicode(e.host):Z.toASCII(e.host.replace(t.PCT_ENCODED,h).toLowerCase())}catch(u){e.error=e.error||"Host's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+u}d(e,t),"suffix"!==r.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var a=g(e,r);if(a!==undefined&&("suffix"!==r.reference&&n.push("//"),n.push(a),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),e.path!==undefined){var i=e.path;r.absolutePath||o&&o.absolutePath||(i=m(i)),a===undefined&&(i=i.replace(/^\/\//,"/%2F")),n.push(i)}return e.query!==undefined&&(n.push("?"),n.push(e.query)),e.fragment!==undefined&&(n.push("#"),n.push(e.fragment)),n.join("")}function E(e,r){var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},n=arguments[3],o={};return n||(e=l(v(e,t),t),r=l(v(r,t),t)),t=t||{},!t.tolerant&&r.scheme?(o.scheme=r.scheme,o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=m(r.path||""),o.query=r.query):(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined?(o.userinfo=r.userinfo,o.host=r.host,o.port=r.port,o.path=m(r.path||""),o.query=r.query):(r.path?("/"===r.path.charAt(0)?o.path=m(r.path):(e.userinfo===undefined&&e.host===undefined&&e.port===undefined||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+r.path:o.path=r.path:o.path="/"+r.path,o.path=m(o.path)),o.query=r.query):(o.path=e.path,r.query!==undefined?o.query=r.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=r.fragment,o}function C(e,r,t){return v(E(l(e,t),l(r,t),t,!0),t)}function y(e,r){return"string"==typeof e?e=v(l(e,r),r):"object"===n(e)&&(e=l(v(e,r),r)),e}function S(e,r,t){return"string"==typeof e?e=v(l(e,t),t):"object"===n(e)&&(e=v(e,t)),"string"==typeof r?r=v(l(r,t),t):"object"===n(r)&&(r=v(r,t)),e===r}function A(e,r){return e&&e.toString().replace(r&&r.iri?w.ESCAPE:x.ESCAPE,c)}function D(e,r){return e&&e.toString().replace(r&&r.iri?w.PCT_ENCODED:x.PCT_ENCODED,h)}function F(e){var r=h(e);return r.match(oe)?r:e}var x=i(!1),w=i(!0),O=function(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)},b=2147483647,N=/^xn--/,I=/[^\0-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=Math.floor,P=String.fromCharCode,U=function(e){return String.fromCodePoint.apply(String,O(e))},q=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36},H=function(e,r){return e+22+75*(e<26)-((0!=r)<<5)},j=function(e,r,t){var n=0;for(e=t?_(e/700):e>>1,e+=_(e/r);e>455;n+=36)e=_(e/35);return _(n+36*e/(e+38))},z=function(e){var r=[],t=e.length,n=0,o=128,a=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var s=0;s<i;++s)e.charCodeAt(s)>=128&&u("not-basic"),r.push(e.charCodeAt(s));for(var p=i>0?i+1:0;p<t;){for(var f=n,c=1,h=36;;h+=36){p>=t&&u("invalid-input");var d=q(e.charCodeAt(p++));(d>=36||d>_((b-n)/c))&&u("overflow"),n+=d*c;var l=h<=a?1:h>=a+26?26:h-a;if(d<l)break;var g=36-l;c>_(b/g)&&u("overflow"),c*=g}var m=r.length+1;a=j(n-f,m,0==f),_(n/m)>b-o&&u("overflow"),o+=_(n/m),n%=m,r.splice(n++,0,o)}return String.fromCodePoint.apply(String,r)},L=function(e){var r=[];e=f(e);var t=e.length,n=128,o=0,a=72,i=!0,s=!1,p=undefined;try{for(var c,h=e[Symbol.iterator]();!(i=(c=h.next()).done);i=!0){var d=c.value;d<128&&r.push(P(d))}}catch(L){s=!0,p=L}finally{try{!i&&h["return"]&&h["return"]()}finally{if(s)throw p}}var l=r.length,g=l;for(l&&r.push("-");g<t;){var m=b,v=!0,E=!1,C=undefined;try{for(var y,S=e[Symbol.iterator]();!(v=(y=S.next()).done);v=!0){var A=y.value;A>=n&&A<m&&(m=A)}}catch(L){E=!0,C=L}finally{try{!v&&S["return"]&&S["return"]()}finally{if(E)throw C}}var D=g+1;m-n>_((b-o)/D)&&u("overflow"),o+=(m-n)*D,n=m;var F=!0,x=!1,w=undefined;try{for(var O,N=e[Symbol.iterator]();!(F=(O=N.next()).done);F=!0){var I=O.value;if(I<n&&++o>b&&u("overflow"),I==n){for(var T=o,R=36;;R+=36){var U=R<=a?1:R>=a+26?26:R-a;if(T<U)break;var q=T-U,z=36-U;r.push(P(H(U+q%z,0))),T=_(q/z)}r.push(P(H(T,0))),a=j(o,D,g==l),o=0,++g}}}catch(L){x=!0,w=L}finally{try{!F&&N["return"]&&N["return"]()}finally{if(x)throw w}}++o,++n}return r.join("")},$=function(e){return p(e,function(e){return N.test(e)?z(e.slice(4).toLowerCase()):e})},M=function(e){return p(e,function(e){return I.test(e)?"xn--"+L(e):e})},Z={version:"2.1.0",ucs2:{decode:f,encode:U},decode:z,encode:L,toASCII:M,toUnicode:$},V={},k=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,G="".match(/(){0}/)[1]===undefined,Q=/^\.\.?\//,Y=/^\/\.(\/|$)/,B=/^\/\.\.(\/|$)/,J=/^\/?(?:.|\n)*?(?=\/|$)/,K={scheme:"http",domainHost:!0,parse:function(e,r){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,r){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=undefined),e.path||(e.path="/"),e}},W={scheme:"https",domainHost:K.domainHost,parse:K.parse,serialize:K.serialize},X={},ee="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",re="[0-9A-Fa-f]",te=t(t("%[EFef][0-9A-Fa-f]%"+re+re+"%"+re+re)+"|"+t("%[89A-Fa-f][0-9A-Fa-f]%"+re+re)+"|"+t("%"+re+re)),ne=r("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),oe=new RegExp(ee,"g"),ae=new RegExp(te,"g"),ie=new RegExp(r("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ne),"g"),ue=new RegExp(r("[^]",ee,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),se=ue,pe={scheme:"mailto",parse:function(e,r){var t=e.to=e.path?e.path.split(","):[];if(e.path=undefined,e.query){for(var n=!1,o={},a=e.query.split("&"),i=0,u=a.length;i<u;++i){var s=a[i].split("=");switch(s[0]){case"to":for(var p=s[1].split(","),f=0,c=p.length;f<c;++f)t.push(p[f]);break;case"subject":e.subject=D(s[1],r);break;case"body":e.body=D(s[1],r);break;default:n=!0,o[D(s[0],r)]=D(s[1],r)}}n&&(e.headers=o)}e.query=undefined;for(var h=0,d=t.length;h<d;++h){var l=t[h].split("@");if(l[0]=D(l[0]),r.unicodeSupport)l[1]=D(l[1],r).toLowerCase();else try{l[1]=Z.toASCII(D(l[1],r).toLowerCase())}catch(g){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+g}t[h]=l.join("@")}return e},serialize:function(e,r){var t=a(e.to);if(t){for(var n=0,i=t.length;n<i;++n){var u=String(t[n]),s=u.lastIndexOf("@"),p=u.slice(0,s).replace(ae,F).replace(ae,o).replace(ie,c),f=u.slice(s+1);try{f=r.iri?Z.toUnicode(f):Z.toASCII(D(f,r).toLowerCase())}catch(g){e.error=e.error||"Email address's domain name can not be converted to "+(r.iri?"Unicode":"ASCII")+" via punycode: "+g}t[n]=p+"@"+f}e.path=t.join(",")}var h=e.headers=e.headers||{};e.subject&&(h.subject=e.subject),e.body&&(h.body=e.body);var d=[];for(var l in h)h[l]!==X[l]&&d.push(l.replace(ae,F).replace(ae,o).replace(ue,c)+"="+h[l].replace(ae,F).replace(ae,o).replace(se,c));return d.length&&(e.query=d.join("&")),e}},fe=new RegExp("^urn\\:((?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31}))$"),ce={scheme:"urn",parse:function(e,r){var t=e.path&&e.path.match(/^([^\:]+)\:(.*)/);if(t){var n="urn:"+t[1].toLowerCase(),o=V[n];o||(o=V[n]={scheme:n,parse:function(e,r){return e},serialize:V.urn.serialize}),e.scheme=n,e.path=t[2],e=o.parse(e,r)}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,r){var t=e.scheme||r.scheme;if(t&&"urn"!==t){var n=t.match(fe)||["urn:"+t,t];e.scheme="urn",e.path=n[1]+":"+(e.path?e.path.replace(/[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g,c):"")}return e}},he=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,de={scheme:"urn:uuid",parse:function(e,r){return r.tolerant||e.path&&e.path.match(he)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,r){return r.tolerant||e.path&&e.path.match(he)?e.path=(e.path||"").toLowerCase():e.scheme=undefined,V.urn.serialize(e,r)}};V.http=K,V.https=W,V.mailto=pe,V.urn=ce,V["urn:uuid"]=de,e.SCHEMES=V,e.pctEncChar=c,e.pctDecChars=h,e.parse=l,e.removeDotSegments=m,e.serialize=v,e.resolveComponents=E,e.resolve=C,e.normalize=y,e.equal=S,e.escapeComponent=A,e.unescapeComponent=D,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=uri.all.min.js.map

@@ -111,3 +111,3 @@ /**

;
const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;
const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined;

@@ -114,0 +114,0 @@ export function parse(uriString, options = {}) {

{
"name": "uri-js",
"version": "3.0.0",
"version": "3.0.1",
"description": "An RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.",

@@ -5,0 +5,0 @@ "main": "dist/es5/uri.all.js",

@@ -0,0 +0,0 @@ # URI.js

@@ -0,0 +0,0 @@ import resolve from 'rollup-plugin-node-resolve';

@@ -0,0 +0,0 @@ import { SCHEMES } from "./uri";

@@ -0,0 +0,0 @@ declare module 'punycode' {

@@ -0,0 +0,0 @@ import { URIRegExps } from "./uri";

@@ -0,0 +0,0 @@ import { URIRegExps } from "./uri";

@@ -0,0 +0,0 @@ import { URIComponents, URIOptions } from "../uri";

@@ -0,0 +0,0 @@ import { URIComponents, URIOptions } from "../uri";

@@ -0,0 +0,0 @@ import { URIComponents, URIOptions } from "../uri";

@@ -0,0 +0,0 @@ import { URIComponents, URIOptions } from "../uri";

@@ -0,0 +0,0 @@ import { URIComponents, URIOptions } from "../uri";

@@ -158,3 +158,3 @@ /**

const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;
const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[\dA-F:.]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
const NO_MATCH_IS_UNDEFINED = (<RegExpMatchArray>("").match(/(){0}/))[1] === undefined;

@@ -161,0 +161,0 @@

@@ -0,0 +0,0 @@ export function merge(...sets:Array<string>):string {

@@ -103,2 +103,62 @@ //

//fragment with character tabulation
components = URI.parse("#\t");
strictEqual(components.error, undefined, "path errors");
strictEqual(components.scheme, undefined, "scheme");
//strictEqual(components.authority, undefined, "authority");
strictEqual(components.userinfo, undefined, "userinfo");
strictEqual(components.host, undefined, "host");
strictEqual(components.port, undefined, "port");
strictEqual(components.path, "", "path");
strictEqual(components.query, undefined, "query");
strictEqual(components.fragment, "%09", "fragment");
//fragment with line feed
components = URI.parse("#\n");
strictEqual(components.error, undefined, "path errors");
strictEqual(components.scheme, undefined, "scheme");
//strictEqual(components.authority, undefined, "authority");
strictEqual(components.userinfo, undefined, "userinfo");
strictEqual(components.host, undefined, "host");
strictEqual(components.port, undefined, "port");
strictEqual(components.path, "", "path");
strictEqual(components.query, undefined, "query");
strictEqual(components.fragment, "%0A", "fragment");
//fragment with line tabulation
components = URI.parse("#\v");
strictEqual(components.error, undefined, "path errors");
strictEqual(components.scheme, undefined, "scheme");
//strictEqual(components.authority, undefined, "authority");
strictEqual(components.userinfo, undefined, "userinfo");
strictEqual(components.host, undefined, "host");
strictEqual(components.port, undefined, "port");
strictEqual(components.path, "", "path");
strictEqual(components.query, undefined, "query");
strictEqual(components.fragment, "%0B", "fragment");
//fragment with form feed
components = URI.parse("#\f");
strictEqual(components.error, undefined, "path errors");
strictEqual(components.scheme, undefined, "scheme");
//strictEqual(components.authority, undefined, "authority");
strictEqual(components.userinfo, undefined, "userinfo");
strictEqual(components.host, undefined, "host");
strictEqual(components.port, undefined, "port");
strictEqual(components.path, "", "path");
strictEqual(components.query, undefined, "query");
strictEqual(components.fragment, "%0C", "fragment");
//fragment with carriage return
components = URI.parse("#\r");
strictEqual(components.error, undefined, "path errors");
strictEqual(components.scheme, undefined, "scheme");
//strictEqual(components.authority, undefined, "authority");
strictEqual(components.userinfo, undefined, "userinfo");
strictEqual(components.host, undefined, "host");
strictEqual(components.port, undefined, "port");
strictEqual(components.path, "", "path");
strictEqual(components.query, undefined, "query");
strictEqual(components.fragment, "%0D", "fragment");
//all

@@ -105,0 +165,0 @@ components = URI.parse("uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc