UNPKG

json-expression-eval

Version:

json serializable rule engine / boolean expression evaluator

18 lines 730 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExpressionHandler = void 0; const evaluator_1 = require("./evaluator"); class ExpressionHandler { constructor(expression, functionsTable) { this.expression = expression; this.functionsTable = functionsTable; } async evaluate(context, runOptions) { return (0, evaluator_1.evaluate)(this.expression, context, this.functionsTable, runOptions); } async validate(validationContext, runOptions) { await (0, evaluator_1.validate)(this.expression, validationContext, this.functionsTable, runOptions); } } exports.ExpressionHandler = ExpressionHandler; //# sourceMappingURL=expressionHandler.js.map