A utility that converts DevExtreme dxDataGrid filter expressions into MongoDB aggregation pipeline $match stages. Version 1.0.5 is the latest stable release. It supports string-based date conversion and handles complex nested filters with AND/OR combinations. Unlike manual parsing, it automates the translation of the DevExtreme filter format to MongoDB query syntax, reducing boilerplate for applications that use both DevExtreme grids and MongoDB.
npm install devextreme-parse-filter-for-mongodbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a DevExtreme dxDataGrid filter string into a MongoDB aggregation pipeline array with $match operators.
Wrap parseFilter call in try-catch or validate filter input before passing.
Provide date keys as additional arguments: parseFilter(filter, 'dateUpdated', 'createdAt').
Use require or set up a bundler that handles CJS.
Convert filter object to JSON string before passing.
Append additional stages (e.g., $sort, $skip, $limit) to the pipeline as needed.
Use const parseFilter = require('devextreme-parse-filter-for-mongodb');Ensure filter is a valid JSON string before calling parseFilter.
Use parseFilter(filter, ...dateKeysArray) instead of parseFilter(filter, dateKeysArray).
No dependency data recorded yet.