Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
reverend
Advanced tools
Readme
DEPRECATED: 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 = require('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 = require('reverend');
var path;
// Path params
path = reverend('/user/:id', { id: 5 });
// '/user/5';
// Optional path params
path = reverend('/user/:id/:operation?', { id: 5 });
// '/user/5/';
// Multiple path params
path = reverend('/user/:id/:operation', { id: 5, operation: address });
// '/user/5/address';
// Custom match parameters
path = reverend('/posts/:id(\\d+)', { id: 5 });
// '/post/5'
path = reverend('/posts/:id(\\d+)', { id: 'foo' }); // throws
// Unnamed params
path = reverend('/:foo/(.*)', { foo: 'foo', 0: 'bar' });
// '/foo/bar'
MIT
$ npm test
$ npm run cover
$ npm run lint
FAQs
Merge an express-style path string with data to create a valid path.
The npm package reverend receives a total of 423 weekly downloads. As such, reverend popularity was classified as not popular.
We found that reverend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.