UNPKG

@allgemein/expressions

Version:
25 lines 737 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GtDesc = void 0; exports.Gt = Gt; const _ = require("lodash"); const KeyDesc_1 = require("./KeyDesc"); const OpDesc_1 = require("./OpDesc"); class GtDesc extends OpDesc_1.OpDesc { constructor(key, value) { super(key, value); this.type = 'gt'; } 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.GtDesc = GtDesc; function Gt(key, value) { return new GtDesc(key, value); } //# sourceMappingURL=GtDesc.js.map