MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / assertContained

Function assertContained

packages/migrate/src/node.ts:184–188  ·  view source on GitHub ↗
(root: string, candidate: string, message: string)

Source from the content-addressed store, hash-verified

182}
183
184function assertContained(root: string, candidate: string, message: string): void {
185 const localPath = relative(root, candidate);
186 if (localPath === '' || (localPath !== '..' && !localPath.startsWith(`..${sep}`) && !isAbsolute(localPath))) return;
187 throw new Error(message);
188}
189
190async function canonicalDirectory(path: string, label: string): Promise<string> {
191 const canonicalPath = await realpath(path);

Callers 3

planMigrationFilesFunction · 0.70
preflightPlanOutputsFunction · 0.70
safeOutputPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected