mrr.sj.front/node_modules/mingo/dist/esm/operators/pipeline/unset.js

12 lines
279 B
JavaScript
Raw Normal View History

2026-03-25 15:27:45 +08:00
import { ensureArray } from "../../util";
import { $project } from "./project";
const $unset = (collection, expr, options) => {
expr = ensureArray(expr);
const doc = {};
for (const k of expr) doc[k] = 0;
return $project(collection, doc, options);
};
export {
$unset
};