lightweight wrapper around qs
to parse parameters for connect.js and depended frameworks like Express.js
- add
params
toreq
object - user defined function to add and define defaults
$ npm install connect-params
var parameters = require('connect-params')
var app = connect()
.use(parameters(function(params) {
return {
foo: params.foo,
bar: params.bar || params.barr, //aliases
baz: params.baz || null, // defaults
}
}));
- Hack away and send PR
Any contributions are more then welcome! 💖