Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

qs-middleware

springernature64.8kLGPL-3.01.0.3TypeScript support: definitely-typed

Connect querystring middleware

connect, querystring

readme

QS Middleware

Connect querystring middleware.

NPM version Node.js version support Build status Dependencies LGPL-3.0 licensed

var connect = require('connect');
var query = require('qs-middleware');
var app = connect();
app.use(query());

Table Of Contents

Install

Install QS Middleware with npm:

npm install qs-middleware

Usage

query(options)

Create a querystring middleware which adds a parsed query property to the request object:

app.use(query());

app.use(function(request, response) {
    console.log(request.query);
});

You can optionally pass in options which are handed directly to the qs module, which handles querystring parsing:

app.use(query({
    allowDots: true
}));

Contributing

To contribute to QS Middleware, clone this repo locally and commit your code on a separate branch.

Please write unit tests for your code, and check that everything works by running the following before opening a pull-request:

make ci

License

QS Middleware is licensed under the Lesser General Public License (LGPL-3.0) license.
Copyright © 2016, Springer Nature

changelog

History

1.0.3 (2017-03-08)

  • Replace jshint with xo.
  • Update devDependencies.
  • Update "author" field in package.json.

1.0.2 (2017-03-06)

1.0.1 (2016-02-04)

  • Update the repository references and copyright

1.0.0 (2016-02-04)

  • Initial release