UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

16 lines • 808 B
export declare function rstripSlash(s: string): string; export declare function lstripSlash(s: string): string; export declare function stripSlash(s: string): string; export declare function normDir(s: string): string; /** * The longest mount prefix owning `path`, or null. * * The one longest-prefix rule dispatch resolves a path by, shared so a * registry, a runtime routing table and a link filter cannot drift: a * prefix owns its own root (with or without a trailing slash) and * everything at a path boundary below it, so '/a/' owns '/a' and '/a/b' * but never '/ab'. The winner is returned in its input spelling, * letting each caller keep its own convention. */ export declare function ownerPrefix(prefixes: Iterable<string>, path: string): string | null; //# sourceMappingURL=slash.d.ts.map