Download node_modules/axios/lib/helpers/combineURLs.js from khoadang31/uptimerobot: direct link, hf CLI and curl.
- Browser
- Download file 380 Bytes
-
https://huggingface.co/khoadang31/uptimerobot/resolve/main/node_modules/axios/lib/helpers/combineURLs.js
- Command line
-
hf download hf://khoadang31/uptimerobot/node_modules/axios/lib/helpers/combineURLs.js
-
curl -L -o combineURLs.js https://huggingface.co/khoadang31/uptimerobot/resolve/main/node_modules/axios/lib/helpers/combineURLs.js
380 Bytes
| ; | |
| /** | |
| * 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 | |
| */ | |
| module.exports = function combineURLs(baseURL, relativeURL) { | |
| return relativeURL | |
| ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') | |
| : baseURL; | |
| }; | |