MCPcopy Create free account
hub / github.com/denoland/std / join

Function join

path/posix/join.ts:37–46  ·  view source on GitHub ↗
(path?: URL | string, ...paths: string[])

Source from the content-addressed store, hash-verified

35 * @returns The joined path.
36 */
37export function join(path?: URL | string, ...paths: string[]): string {
38 if (path === undefined) return ".";
39 if (path instanceof URL) {
40 path = fromFileUrl(path);
41 }
42 paths = path ? [path, ...paths] : paths;
43 paths.forEach((path) => assertPath(path));
44 const joined = paths.filter((path) => path.length > 0).join("/");
45 return joined === "" ? "." : normalize(joined);
46}

Callers 1

joinGlobsFunction · 0.90

Calls 4

fromFileUrlFunction · 0.90
assertPathFunction · 0.90
normalizeFunction · 0.90
forEachMethod · 0.80

Tested by

no test coverage detected