UNPKG

@allgemein/expressions

Version:
25 lines 738 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GeDesc = void 0; exports.Ge = Ge; const _ = require("lodash"); const KeyDesc_1 = require("./KeyDesc"); const OpDesc_1 = require("./OpDesc"); class GeDesc extends OpDesc_1.OpDesc { constructor(key, value) { super(key, value); this.type = 'ge'; } lookup(source) { const value = this.value instanceof KeyDesc_1.KeyDesc ? source[this.value.key] : _.clone(this.value.value); const key = this.key; return function (target) { return target[key] >= value; }; } } exports.GeDesc = GeDesc; function Ge(key, value) { return new GeDesc(key, value); } //# sourceMappingURL=GeDesc.js.map