25.0.0-beta.3 • Published 7 months ago
@contextjs/routing v25.0.0-beta.3
@contextjs/routing
Declarative, extensible route matching and configuration for ContextJS-based applications.
Features
- Fully type-safe and fluent route configuration
- Support for literal, parameterized, optional, and catch-all route templates
- Fast route matching with scoring and early-exit optimization
- URI decoding, normalization, and edge-case tolerance
- Integration with the
Applicationclass viauseRouting()
Installation
npm i @contextjs/routingUsage
import { Application } from "@contextjs/system";
import { RouteInfo } from "@contextjs/routing";
const app = new Application();
app.useRouting();Matching Example
import { RouteService } from "@contextjs/routing";
const route = RouteService.match("home/123/details", [...routeDefinitions]);
console.log(route?.template); // "home/{id?}/details"API Reference
For detailed API documentation, please refer to the API Reference.
Testing
All features are covered by 100% unit test coverage, ensuring reliability, correctness, and long-term maintainability - so you can focus on building, not debugging.
25.0.0-beta.3
7 months ago
25.0.0-beta.2
7 months ago
25.0.0-beta.1
7 months ago
0.5.3-alpha.1
7 months ago
0.5.2-alpha.1
7 months ago
0.5.1-alpha.1
7 months ago
0.5.0-alpha.1
8 months ago
0.4.8
8 months ago
0.4.7
8 months ago
0.4.6
9 months ago
0.4.5
9 months ago
0.4.4
9 months ago
0.4.3
9 months ago
0.4.2
9 months ago
0.4.1
9 months ago