UNPKG

js-rules-engine

Version:

JavaScript rules engine for validating data object structures.

23 lines (22 loc) 488 B
import { OperatorFn } from './interfaces'; /** * Operator. */ export declare class Operator { constructor(name: string, fn: OperatorFn); /** * Operator name. */ name: string; /** * Operator callback function. */ fn: OperatorFn; /** * Use the provided callback function to evaluate to values. * * @param a Left side value. * @param b Right side value. */ evaluate(a: any, b: any): boolean; }