A MongoDB-like query engine for filtering JavaScript arrays and objects. Version 1.1.5 provides a lightweight, lodash-dependent library that supports a wide range of operators ($lt, $lte, $gt, $gte, $eq, $ne, $regex, $mod, $in, $nin, $_in, $_nin, $size, $exists, $type, $where, $and, $or, $not, $nor) for data filtering. It works in Node.js and browsers, ships TypeScript types, and uses a functional approach (returns a filter function). Compared to full MongoDB drivers or sift.js, it focuses on simplicity and compatibility with MongoDB query syntax.
npm install rule-judgmentNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage with numbers, objects, and context variables using default import.
Use standard $in/$nin for clarity unless you specifically need array containment check.
Consider alternative libraries like sift.js if bundle size is critical.
Use Array.prototype.filter() with the returned function.
npm install rule-judgment
import ruleJudgment from 'rule-judgment' (not { ruleJudgment })npm install lodash