2019-05-03 14:28:36 +00:00
|
|
|
// Copyright IBM Corp. 2014,2019. All Rights Reserved.
|
2016-05-06 00:10:55 +00:00
|
|
|
// Node module: loopback-component-explorer
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2014-07-10 18:49:09 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
// Simple url joiner. Ensure we don't have to care about whether or not
|
|
|
|
// we are fed paths with leading/trailing slashes.
|
|
|
|
module.exports = function urlJoin() {
|
2019-02-05 07:57:18 +00:00
|
|
|
const args = Array.prototype.slice.call(arguments);
|
2014-07-10 18:49:09 +00:00
|
|
|
return args.join('/').replace(/\/+/g, '/');
|
|
|
|
};
|