UNPKG

@dexpenses/rule-conditions

Version:

Condition engine and parser for Dexpenses rules

20 lines 550 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function parseOperator(op) { switch (op) { case '<': return (x, y) => x < y; case '<=': return (x, y) => x <= y; case '==': return (x, y) => x === y; case '>=': return (x, y) => x >= y; case '>': return (x, y) => x > y; default: throw new Error('unknown operator'); } } exports.parseOperator = parseOperator; //# sourceMappingURL=Operator.js.map