# crcn/sift.js

Use Mongodb queries in JavaScript

Repository: https://github.com/crcn/sift.js
Canonical: https://ross.abutalabs.com/products/siftjs
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, frontend, utility
Last push: 2024-06-16T09:58:15+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5360, "days_push": 808, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1702, forks 101 (observed 2026-08-28T04:05:24.395384+00:00)

## What it is
Sift.js is a tiny JavaScript library that lets you use MongoDB query operators (like $in, $gt, $regex, $elemMatch) to filter arrays and test values in-memory. It works in Node.js and the browser, supports custom operations, and offers tree-shaking to omit unused operators from bundles.

## Use cases
- filter arrays of objects with mongodb-style queries in javascript
- use $in, $gt, $regex operators on in-memory data
- build a query filter function for client-side collections
- test single values against a mongo-like query
- filter  data without a database
- create custom query operators for filtering

## When to choose
- you want MongoDB query syntax for filtering in-memory arrays in Node or the browser
- you need a small, tree-shakeable filtering utility with no database dependency
- you want to share query logic between server and client code

## When to avoid
- you need actual MongoDB database queries against a real database
- you need indexing or query optimization for large datasets
- you prefer a different query syntax like JSONata or lodash predicates

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: developer-tools, web-development, frontend
- platform: browser, cross-platform
- tags: mongodb-queries, filtering, query-language, javascript, nodejs

## Member repositories
- crcn/sift.js (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:24.395384+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:37:39.954974+00:00, confidence not recorded.
  - readme: https://github.com/crcn/sift.js (fetched 2026-08-28T04:05:24.395384+00:00, sha 9ef411f20040)
- Data as of 2026-08-30T08:39:29.467469+00:00.
