| ; | |
| /** | |
| * Creates a new URL by combining the specified URLs | |
| * | |
| * @param {string} baseURL The base URL | |
| * @param {string} relativeURL The relative URL | |
| * | |
| * @returns {string} The combined URL | |
| */ | |
| export default function combineURLs(baseURL, relativeURL) { | |
| if (!relativeURL) { | |
| return baseURL; | |
| } | |
| let end = baseURL.length; | |
| while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { | |
| end--; | |
| } | |
| return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, ''); | |
| } | |
Xet Storage Details
- Size:
- 492 Bytes
- Xet hash:
- f862d58cd858b9bbf732762a9cce273477ed2ce07c68848f7405d96c28f4064c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.