routekit-resolver
RouteKit resolver for browser environments.
Installation
NPM package routekit-resolver
provides a commonjs, es2015 modules and TypeScript typings.
npm install -D routekit-resolver
Usage Example
; // routekit:emit("routes")const ROUTES = f: 35 38 33 7 p: "user/" "/edit" s: 0 1 2;// routekit:end const match = ; ;
API
;
resolve()
function has 2 parameters:
map
is a reference to a routes map.path
is a path that should be resolved.
When resolve function returns null
value it means that no match was found.