Reverend has been deprecated and will no longer see updates. The underlying module used to create regular expressions from routes—path-to-regexp—has added reverse-routing functionality. Please favor it over
Reverend. An api-compatible shim can be seen in the shim branch.
Lead Maintainer: Jean-Charles Sisk
Merge an express-style path string with data to create a valid path. Version 0.3.x adds support for Custom Match and Unnamed parameters as provided by path-to-regexp ^0.2.0. To ensure compatibility, use the version of reverend compatible with path-to-regexp which most closely matches the version your application uses.
var reverend = ;
path(String|Array) - An express-style path, or an array of paths, of which only the first element will be used.
object(Object) - An object with keys matching the tokens to be replaced in the route.
'use strict';var reverend = ;var path;// Path paramspath = ;// '/user/5';// Optional path paramspath = ;// '/user/5/';// Multiple path paramspath = ;// '/user/5/address';// Custom match parameterspath = ;// '/post/5'path = ; // throws// Unnamed paramspath = ;// '/foo/bar'
$ npm test
$ npm run cover
$ npm run lint