MCPcopy
hub / github.com/axios/axios / combineURLs

Function combineURLs

lib/helpers/combineURLs.js:11–15  ·  view source on GitHub ↗
(baseURL, relativeURL)

Source from the content-addressed store, hash-verified

9 * @returns {string} The combined URL
10 */
11export default function combineURLs(baseURL, relativeURL) {
12 return relativeURL
13 ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
14 : baseURL;
15}

Callers 2

buildFullPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected