MCPcopy Create free account
hub / github.com/chhoumann/quickadd / normalizeVaultFilePath

Function normalizeVaultFilePath

src/utils/fileOpening.ts:245–248  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

243}
244
245export function normalizeVaultFilePath(path: string): string {
246 const normalized = normalizePath(path).replace(/\/{2,}/g, "/");
247 return normalized.replace(/^\/+/, "");
248}
249
250export function areSameVaultFilePath(a: string, b: string): boolean {
251 return normalizeVaultFilePath(a) === normalizeVaultFilePath(b);

Callers 2

areSameVaultFilePathFunction · 0.85

Calls 1

normalizePathFunction · 0.90

Tested by

no test coverage detected