UNPKG

js-rules-engine

Version:

JavaScript rules engine for validating data object structures.

20 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.defaultOperators = void 0; var operator_1 = require("./operator"); /** * Default operators. */ exports.defaultOperators = [ new operator_1.Operator('equals', function (a, b) { return a === b; }), new operator_1.Operator('notEquals', function (a, b) { return a !== b; }), new operator_1.Operator('in', function (a, b) { return a.indexOf(b) > -1; }), new operator_1.Operator('notIn', function (a, b) { return a.indexOf(b) === -1; }), new operator_1.Operator('contains', function (a, b) { return a.indexOf(b) > -1; }), new operator_1.Operator('notContains', function (a, b) { return a.indexOf(b) === -1; }), new operator_1.Operator('lessThan', function (a, b) { return a < b; }), new operator_1.Operator('lessThanOrEquals', function (a, b) { return a <= b; }), new operator_1.Operator('greaterThan', function (a, b) { return a > b; }), new operator_1.Operator('greaterThanOrEquals', function (a, b) { return a >= b; }), ]; //# sourceMappingURL=default-operators.js.map