1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 * Join all the arguments together and normalize the resulting URI.
9 * The initial path must be an full URI with a protocol (i.e. http://).
11 exports.joinURI = (initialPath, ...paths) => {
15 url = new URL(initialPath);
20 for (const path of paths) {
22 url = new URL(path, url);