dfa-router
A simple server-side url router using Deterministic Finite Automaton.
Installation
This is published at npm registry: dfa-router.
You can install it via npm
, yarn
or what you like.
npm install dfa-router
How to Use
It behaves like a simple key-value map.
const router = ;router;router; const foo = router;assert;const bar = router;assert;
And also, it can capture parameters.
const router = ;router; const foo = router;assert;
See examples/server.js
and test/
to learn more.