UNPKG

@sls-next/core

Version:
10 lines (8 loc) 311 B
export const isDynamicRoute = (route: string): boolean => { // Identify /[param]/ in route string return /\/\[[^\/]+?](?=\/|$)/.test(route); }; export const isOptionalCatchAllRoute = (route: string): boolean => { // Identify /[[param]]/ in route string return /\/\[\[[^\/]+?]](?=\/|$)/.test(route); };