express-query-boolean icon indicating copy to clipboard operation
express-query-boolean copied to clipboard

Parse booleans in req.query for express/connect applications.

Results 8 express-query-boolean issues
Sort by recently updated
recently updated
newest added

Hey, It'd be cool if your lib parse the string value to lower case during the comparison because people can send `TRUE` or `FALSE` values or even `True` or `False`....

Using runMiddleware the undefined.constructor exception is raised in the parse.js file.

`// ?a=1` true `// ?a=0` true as well I would have expected zero to be false. Isn't it?

I would suggest to use `JSON.parse` to parse values. ``` js var a = 'true'; JSON.parse(a) // returns boolean `true` ```

Hi @mariusc23! 🙂 Would it be possible to give the middleware function a name? Tools such as New Relic report it as `` unless the function has a name, which...

Started getting this error after upgrading to express 5 ``` TypeError: obj.hasOwnProperty is not a function at parseObject (/Users/Sanket/Workspace/X/node_modules/express-query-boolean/lib/parse.js:60:13) at /Users/Sanket/Workspace/X/node_modules/express-query-boolean/index.js:5:17 ``` Maybe it's linked to this https://expressjs.com/en/guide/migrating-5.html#req.query > req.query...

Took it from repository description: