MCPcopy Index your code
hub / github.com/angular/angular / isWithinBasePath

Function isWithinBasePath

packages/core/schematics/utils/tsurge/project_paths.ts:128–130  ·  view source on GitHub ↗

* Whether `path` is a descendant of the `base`? * E.g. `a/b/c` is within `a/b` but not within `a/x`.

(fs: FileSystem, base: AbsoluteFsPath, path: AbsoluteFsPath)

Source from the content-addressed store, hash-verified

126 * E.g. `a/b/c` is within `a/b` but not within `a/x`.
127 */
128function isWithinBasePath(fs: FileSystem, base: AbsoluteFsPath, path: AbsoluteFsPath): boolean {
129 return isLocalRelativePath(fs.relative(base, path));
130}

Callers 1

projectFileFunction · 0.70

Calls 2

isLocalRelativePathFunction · 0.90
relativeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…