UNPKG

next-router-segments

Version:

Parsing Next.js pathname to structured segments, which you can use in various ways.

7 lines (6 loc) 164 B
export interface RouteSegment { slug: string; url: string; name: string; } export declare const getRouteSegments: (pathname: string) => RouteSegment[];