MCPcopy
hub / github.com/angular/angular / joinPaths

Function joinPaths

packages/service-worker/worker/testing/mock.ts:306–308  ·  view source on GitHub ↗

* Join two path segments, ensuring that there is exactly one slash (`/`) between them.

(path1: string, path2: string)

Source from the content-addressed store, hash-verified

304 * Join two path segments, ensuring that there is exactly one slash (`/`) between them.
305 */
306function joinPaths(path1: string, path2: string): string {
307 return `${path1.replace(/\/$/, '')}/${path2.replace(/^\//, '')}`;
308}

Callers 4

updateRootDirMethod · 0.85
withStaticFilesMethod · 0.85
withManifestMethod · 0.85
tmpHashTableForFsFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…