UNPKG

mingo

Version:

MongoDB query language for in-memory objects

11 lines (10 loc) 363 B
import { computeValue } from "../../../core/_internal"; import { assert, isArray, truthy } from "../../../util/_internal"; const $or = (obj, expr, options) => { assert(isArray(expr), "$or expects array of expressions"); const strict = options.useStrictMode; return expr.some((v) => truthy(computeValue(obj, v, null, options), strict)); }; export { $or };