Add sh to darwin.sh execution

This commit is contained in:
Shivam Mathur
2019-09-06 23:22:15 +05:30
parent 76bcc07458
commit 1c6748567c
73 changed files with 7573 additions and 104 deletions
+14
View File
@@ -0,0 +1,14 @@
'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
*/
module.exports = function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
};