pagamio-frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
10 lines (9 loc) • 423 B
TypeScript
/**
* Checks if a URL segment is an identifier (UUID, numeric ID, or long slug).
* @param segment - The URL path segment to check
* @returns True if the segment matches any of these patterns:
* - UUID format (e.g., '123e4567-e89b-12d3-a456-426614174000')
* - Numeric ID (e.g., '123')
* - Alphanumeric slug 30 characters or longer (for compatibility)
*/
export declare const isUUIDorID: (segment: string) => boolean;