UNPKG

@wroud/navigation

Version:

A flexible, pattern-matching navigation system for JavaScript applications with built-in routing, browser integration, and navigation state management

25 lines 828 B
/** * Path utilities for URL pattern matching */ /** * Splits a URL or pattern string into segments */ export declare function splitPath(path: string): string[]; /** * Checks if a segment is a parameter (starts with ":") */ export declare function isParameterSegment(segment: string): boolean; /** * Checks if a segment is a wildcard parameter (starts with ":" and ends with "*") */ export declare function isWildcardSegment(segment: string): boolean; /** * Extracts parameter name from a parameter segment */ export declare function extractParamName(segment: string): string; export declare function extractParamType(segment: string): string; /** * Joins segments into a URL path with caching for common paths */ export declare function joinPath(segments: string[]): string; //# sourceMappingURL=path-utils.d.ts.map