New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

express-param-capture

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-param-capture

process request parameters with regexp

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

express-param-capture

NPM Version Build Status Coverage Status

Process request parameters with regexp and use the resulting capturing group in the routes.

like express-params but works properly in recent express releases where the use of app.param(fun) has been deprecated.

Usage

app = express()
capture = require('express-param-capture')

app.param('locale', capture(/([a-z]{2})_([A-Z]{2})/));
app.get('/:locale', function (req, res) {
    res.status(200).send(req.params.locale[1] + ' - ' + req.params.locale[2]);
});

FAQs

Package last updated on 03 Mar 2015

Did you know?

Socket

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.

Install

Related posts