Path-Exec
A simple route control to execute actions.
How Install
npm install --save path-exec
How Used
Create a paths control, this save a function and is executed when matched with path.exec()
const PathExec = let paths =
paths.use(pathName, keys, execFunction)
Write a path match with paths.use()
paths
The
pathName
use path-to-regexp
paths.exec()
Use to match all paths defined with paths.use
.
// paths.use('/say/:name' ...// paths.use('/say/:name?/role' ...// paths.use('/say/:name?/setting/:option' ...paths
Customize parameters
Defined with path value.
// Usepaths
// Executpaths
Change Logs
Please see the changelog on CHANGELOG.md
License
Please see the license MIT on LICENSE