MCPcopy Create free account
hub / github.com/angular/angular / joinPaths

Function joinPaths

packages/service-worker/worker/testing/mock.ts:301–303  ·  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

299 * Join two path segments, ensuring that there is exactly one slash (`/`) between them.
300 */
301function joinPaths(path1: string, path2: string): string {
302 return `${path1.replace(/\/$/, '')}/${path2.replace(/^\//, '')}`;
303}

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