Query builder for accepting URL query parameters into your MongoDB queries. Safe and feature rich. Supports most of MongoDB's query operators such as $eq, $gt, $lt, $ne, $in, $nin, $exists, $regex, geospatial queries such as bbox and near, as well as your own custom query business logic!
Following from #67, this creates an option (date.toString) to use JavaScript date objects in queries rather than ISO strings. I didn't add test coverage for the option against all date formats, as it seemed that demonstrating the option works for each date method is sufficient.
Changing the arrow functions to standard functions does make things a bit uglier, but it's necessary to access the options on the bound this.
Following from #67, this creates an option (
date.toString
) to use JavaScript date objects in queries rather than ISO strings. I didn't add test coverage for the option against all date formats, as it seemed that demonstrating the option works for each date method is sufficient.Changing the arrow functions to standard functions does make things a bit uglier, but it's necessary to access the options on the bound
this
.