@alwatr/resolve-url 9.3.0 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
- /* 📦 @alwatr/resolve-url v9.3.0 */
1
+ /* 📦 @alwatr/resolve-url v9.4.0 */
2
2
  function C(...b){if(b=b.filter((j)=>typeof j==="string"&&j.length>0),b.length===0)return"";let q=/^\/+/,v=/\/+$/,y=/\/{2,}/g,z=b[0].charAt(0)==="/"?"/":"",k=b[b.length-1],A=k.charAt(k.length-1)==="/"?"/":"";return(z+b.map((j)=>j.replace(q,"").replace(v,"")).filter((j)=>j).join("/").replace("://","{{PROTOCOL_SLASH}}")+A).replace(y,"/").replace("{{PROTOCOL_SLASH}}","://")}export{C as resolveUrl};
3
3
 
4
- //# debugId=699E5E4BC90B640E64756E2164756E21
4
+ //# debugId=B7BD10CBC1576FF764756E2164756E21
5
5
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -5,6 +5,6 @@
5
5
  "export function resolveUrl(...parts: string[]): string {\n parts = parts.filter((part: string): part is string => typeof part === 'string' && part.length > 0);\n\n if (parts.length === 0) {\n return '';\n }\n\n const leadingSlashes = /^\\/+/;\n const trailingSlashes = /\\/+$/;\n const multipleSlashes = /\\/{2,}/g;\n\n const prefix = parts[0].charAt(0) === '/' ? '/' : ''; // Add leading slash if the first part has it\n const lastPart = parts[parts.length - 1];\n const suffix = lastPart.charAt(lastPart.length - 1) === '/' ? '/' : ''; // Add trailing slash if the last part has it\n\n const url = (\n prefix +\n parts\n .map((part) => part.replace(leadingSlashes, '').replace(trailingSlashes, '')) // Remove leading and trailing slashes\n .filter((part) => part) // Remove empty parts\n .join('/')\n // Replace multiple slashes with a single slash, except for protocol\n .replace('://', '{{PROTOCOL_SLASH}}') +\n suffix\n )\n .replace(multipleSlashes, '/')\n .replace('{{PROTOCOL_SLASH}}', '://');\n\n return url;\n}\n"
6
6
  ],
7
7
  "mappings": ";AAAO,SAAS,CAAU,IAAI,EAAyB,CAGrD,GAFA,EAAQ,EAAM,OAAO,CAAC,IAAiC,OAAO,IAAS,UAAY,EAAK,OAAS,CAAC,EAE9F,EAAM,SAAW,EACnB,MAAO,GAGT,IAAM,EAAiB,OACjB,EAAkB,OAClB,EAAkB,UAElB,EAAS,EAAM,GAAG,OAAO,CAAC,IAAM,IAAM,IAAM,GAC5C,EAAW,EAAM,EAAM,OAAS,GAChC,EAAS,EAAS,OAAO,EAAS,OAAS,CAAC,IAAM,IAAM,IAAM,GAepE,OAZE,EACA,EACG,IAAI,CAAC,IAAS,EAAK,QAAQ,EAAgB,EAAE,EAAE,QAAQ,EAAiB,EAAE,CAAC,EAC3E,OAAO,CAAC,IAAS,CAAI,EACrB,KAAK,GAAG,EAER,QAAQ,MAAO,oBAAoB,EACtC,GAEC,QAAQ,EAAiB,GAAG,EAC5B,QAAQ,qBAAsB,KAAK",
8
- "debugId": "699E5E4BC90B640E64756E2164756E21",
8
+ "debugId": "B7BD10CBC1576FF764756E2164756E21",
9
9
  "names": []
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/resolve-url",
3
- "version": "9.3.0",
3
+ "version": "9.4.0",
4
4
  "description": "A tiny TypeScript library to resolve URLs.",
5
5
  "license": "MPL-2.0",
6
6
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com> (https://ali.mihandoost.com)",
@@ -22,7 +22,7 @@
22
22
  "sideEffects": false,
23
23
  "devDependencies": {
24
24
  "@alwatr/nano-build": "9.3.0",
25
- "@alwatr/standard": "9.3.0",
25
+ "@alwatr/standard": "9.4.0",
26
26
  "@alwatr/type-helper": "9.1.1",
27
27
  "typescript": "^6.0.2"
28
28
  },
@@ -69,5 +69,5 @@
69
69
  "utility",
70
70
  "utils"
71
71
  ],
72
- "gitHead": "adf6d486667eefee42dfc87938e3af96f87c4738"
72
+ "gitHead": "662f1047fc2a1b53a00902028d6cebfd04b52dd5"
73
73
  }