Skip to content
Handles numeric and boolean values for Express req.query object.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json

README.md

query-types

Handles numeric and boolean values for Express req.query object.

Setup

$ npm install --save query-types

Usage

var queryType = require('query-types');
var express = require('express');

app.use(queryType.middleware())

app.get('/', function(req, res) {
  res.json(req.query); // Response example: { enabled: true, price: 123.13, name: 'John Smith', origin: [31.412, 41.213] }  
});
You can’t perform that action at this time.