
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
express-params-handler
Advanced tools
Express.js v4+ params handler
This lib is replacement of express-params which is made for Express 2.5. Express v4+ deprecated number of features which are in use of that original library. This lib offers similar functionality but doesn't use deprecated methods of new Express.
npm i express-params-handler
var expressParams = require('express-params-handler')
var app = express()
app.param('id', expressParams(Number))
app.param('date', expressParams(/^\d{4}-\d{2}-\d{2}$/))
app.get('/by-id/:id', function(req, res, next) {
// req.params.id will be a number
})
app.get('/by-date/:date', function(req, res, next) {
// req.params.date will be a string with YYYY-MM-DD format
})
MIT
FAQs
Express.js params handler
The npm package express-params-handler receives a total of 386 weekly downloads. As such, express-params-handler popularity was classified as not popular.
We found that express-params-handler demonstrated a healthy version release cadence and project activity because the last version was released less than 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.