@modern-js/utils
Version:
A Progressive React Framework for modern web development.
1 lines • 1.39 kB
JavaScript
(()=>{var e={670:function(e){(function(r,i,t){if(true&&e.exports)e.exports=t();else if(typeof define==="function"&&define.amd)define(t);else i[r]=t()})("urljoin",this,(function(){function normalize(e){var r=[];if(e.length===0){return""}if(typeof e[0]!=="string"){throw new TypeError("Url must be a string. Received "+e[0])}if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var i=e.shift();e[0]=i+e[0]}if(e[0].match(/^file:\/\/\//)){e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///")}else{e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://")}for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=="string"){throw new TypeError("Url must be a string. Received "+n)}if(n===""){continue}if(t>0){n=n.replace(/^[\/]+/,"")}if(t<e.length-1){n=n.replace(/[\/]+$/,"")}else{n=n.replace(/[\/]+$/,"/")}r.push(n)}var a=r.join("/");a=a.replace(/\/(\?|&|#[^!])/g,"$1");var f=a.split("?");a=f.shift()+(f.length>0?"?":"")+f.join("&");return a}return function(){var e;if(typeof arguments[0]==="object"){e=arguments[0]}else{e=[].slice.call(arguments)}return normalize(e)}}))}};var r={};function __nccwpck_require__(i){var t=r[i];if(t!==undefined){return t.exports}var n=r[i]={exports:{}};var a=true;try{e[i].call(n.exports,n,n.exports,__nccwpck_require__);a=false}finally{if(a)delete r[i]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(670);module.exports=i})();