UNPKG

mingo

Version:

MongoDB query language for in-memory objects

10 lines (9 loc) 302 B
import { computeValue } from "../../../core"; import { intersection } from "../../../util"; const $setIsSubset = (obj, expr, options) => { const args = computeValue(obj, expr, null, options); return intersection(args, options?.hashFunction).length === args[0].length; }; export { $setIsSubset };