MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / normalizePathForCompare

Function normalizePathForCompare

packages/node-runtime/src/data-dir-switch.ts:71–75  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

69}
70
71function normalizePathForCompare(input: string): string {
72 const resolved = path.resolve(input)
73 const normalized = path.normalize(resolved)
74 return process.platform === 'win32' ? normalized.toLowerCase() : normalized
75}
76
77function isSubPath(parent: string, child: string): boolean {
78 const parentPath = normalizePathForCompare(parent)

Callers 1

isSubPathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected