import { MaskRouter } from "https://deno.land/x/allo_controllers@v1.1.5/libs/allo_routing.ts";
Class MaskRouter
is a router that mathing url by mask.
Some part of the mask can be optional. This part is closed to [
and ]
.
Mask may contains parameters.
Parameter is defined by <
and >
symbols.
In the parameter you can specific the default value. <param=default>
Also you can define regular expression for value validation.<param=default regexp>
Examples:
product[/detail]
[product[/detail]]
product/<id>
page/<id=123 \\d+>