Releases: pbatey/query-to-mongo
Releases · pbatey/query-to-mongo
v0.12.1
v0.12.0
0.12.0 - 2024-09-03
Fixed
- added typescript def for keywords
v0.11.4
0.11.4 - 2024-07-02
Changed
- dependabot bump braces from 3.0.2 to 3.0.3
v0.11.3
0.11.3 - 2023-10-19
Changed
- dependabot bump @babel/traverse to 7.23.2
v0.11.2
0.11.2 - 2023-09-04
Added
- eslint
Changed
- replaced mocha+chai with jest
Fixed
- addressed eslint issues
v0.11.1
0.11.1 - 2023-09-04
Added
- Changelog
Fixed
- Corrected export in typescript declaration
Typescript types
Added support for Typescript types - thanks Marcos Piñero!
Commas in regex
This patch release handles commas within regular expressions such as &text=/word,word/i
.
Keyword override
With this release, query keywords can be overridden so they may be used as query filters.
This will allow an omit=false
query filter by replacing the omit keyword with $omit.
altKeywords = {fields:'$fields', omit:'$omit', sort:'$sort', offset:'$offset', limit:'$limit'}
var q = q2m(res.query, {keywords: altKeywords});
Thanks @plbin97 for the suggestion.
Multiple negations
This version now handles multiple !value negations. For instance field=!a&field=!b
yields the query criteria {field:{$nin:["a","b"]}}
.