Array filtering for Node.js and the browser with a MongoDB-inspired query language. Version 0.3.0 (last stable). Provides comparators ($gt, $gte, $lt, $lte, $all, $exists, $mod, $eq, $ne, $in, $nin, $size) and traversables ($or, $nor, $and). Supports deep path matching, multiple output types (subset, boolean, index) and input modes (array, single). No dependencies. Early development stage with minimal maintenance.
npm install filtrNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic filtering with comparators, deep path matching, and getPathValue helper.
Review options documentation and choose appropriate spec.
Use correct path syntax; e.g., 'a.b' for {a: {b: ...}}, 'arr[0].prop' for arrays.Consider alternatives like MongoDB's query engine or lodash's filter for modern applications.
npm install filtr
const filtr = require('filtr'); or import filtr from 'filtr';const query = filtr({ $gt: 15 }); query.test([1,20]);No dependency data recorded yet.