1.0.2 • Published 8 years ago

express-qs-dotobj v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

express-qs-dotobj

Nodejs express middleware for parsing query string parameters delimited by dot into an object.

Install

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install express-qs-dotobj

Usage

const express = require('express')
const dotobj = require('express-qs-dotobj')

const app = express()

let options = {}
app.use(dotobj(options))

GET /?param.group=1&param.tag=2

console.log(req.query)
{
  param: {
    group: '1',
    tag: '2',
  }
}

Options

keepOrig

  • default: false

Keep original parameter in query object (by default its deleted).