Skip to content

lightweight wrapper around qs to parse parameters for connect.js and depended frameworks like Express.js

License

Notifications You must be signed in to change notification settings

Jimdo/connect-params

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect-params

lightweight wrapper around qs to parse parameters for connect.js and depended frameworks like Express.js

Features

  • add params to req object
  • user defined function to add and define defaults

Installation

Node.js and NPM is required.

$ npm install connect-params

Usage

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
  }
}));

Contribution

  1. Hack away and send PR

Any contributions are more then welcome! 💖

About

lightweight wrapper around qs to parse parameters for connect.js and depended frameworks like Express.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published