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

Function normalizePath

tests/obsidian-stub.ts:745–748  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

743// callers rely on ("a//b" and "a/b" denote one path). (Real Obsidian also trims
744// edge slashes and NFC-normalizes; those are not modelled here.)
745export function normalizePath(p: string): string {
746 if (typeof p !== 'string') return '' as unknown as string;
747 return p.replace(/\\/g, '/').replace(/\/+/g, '/');
748}
749
750// Minimal debounce for tests: execute immediately.
751export function debounce<T extends (...args: any[]) => any>(

Callers 9

parentFolderPathFunction · 0.90
normalizeVaultFilePathFunction · 0.90
readQuickAddPackageFunction · 0.90
findDuplicateAssetPathFunction · 0.90
validateAssetDestinationFunction · 0.90
writePackageToVaultFunction · 0.90
optimisticMethod · 0.90
resolveMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected