sift is a lightweight JavaScript library for performing MongoDB-style query filtering on arrays and individual values. Version 18.3.1 (current stable) is actively maintained, supports Node.js >= 18, and ships TypeScript definitions. Key differentiators: tiny bundle size, tree-shakable, supports all standard MongoDB query operators ($in, $regex, $elemMatch, etc.), works in browsers and Node.js, and allows custom operations. Unlike MongoDB drivers, sift runs client-side for filtering in-memory data. The library is ESM-first and has no dependencies.
npm install weiliddat-siftNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates filtering arrays and objects using MongoDB-style $gt and $gte operators with ESM import.
Update Node.js to >= 18 and use import instead of require(). For CommonJS projects, consider dynamic import() or stay on v16.x.
No change needed if using current API. Refer to docs for usage with arrays via .filter().
Use only supported operators listed in documentation. For unsupported queries, consider using a different library or MongoDB aggregation.
Use dynamic import: const sift = await import('sift'); or switch to import syntax in an ESM context.Use default import: import sift from 'sift'; for the main filtering function.
No dependency data recorded yet.