med-notes/.pnpm-store/v10/files/5c/153824519ead639477e407f5dca7a1b913d91d1ca6179a9fe33fbb10f9bdd9eacd6d24e1dade3107ab65798c4fb2b688eb3984b9ed44c624c6c2154f9b579c
2025-06-26 04:42:51 +00:00

16 lines
382 B
Plaintext

'use strict';
/**
* 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) {
return relativeURL
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}