@frost.js/router
v0.1.2
Published
Filesystem route discovery, pattern compilation, and matching for Frost
Maintainers
Readme
@frost.js/router
File-system route discovery, pattern compilation, and matching for Frost.
The frost CLI and dev server use this internally. Import it directly to enumerate routes (discoverRoutes), match pathnames (matchRoutes), or generate route types in custom tooling.
Install
npm install @frost.js/routerExample
import { discoverRoutes, matchRoutes } from "@frost.js/router";
const routes = await discoverRoutes("src/app", "src/api");
const match = matchRoutes(routes, "/hello/world");
// match?.route.params → { name: "world" }