UNPKG

next-compose-middleware

Version:

`next-compose-middleware` is a library that simplifies building complex, declarative middleware for Next.js applications. It allows you to create highly readable and maintainable middleware by composing multiple functions together.

7 lines (6 loc) 428 B
import { ComposableMiddleware, ComposeOption } from './compose'; export declare type Path = `/${string}`; export declare const getDividedPaths: (path: string) => string[]; export declare const toPath: (path: string) => Path; export declare const isDynamicPath: (path: string) => boolean; export declare const findPathValue: (pathMap: Omit<ComposeOption, 'scripts'>, path: Path) => ComposableMiddleware[] | ComposeOption | null;