UNPKG

grule

Version:

A simple and powerful mechanism for validating rules in JSON.

23 lines (22 loc) 465 B
import { IRules } from '../src/interfaces'; export declare class Grule<T> { private facts; private context; constructor(facts: T); /** * @method subscribe * * @desc Enter the rules for the informed facts. * * @param rules */ private subscribe; /** * @method run * * @desc Run the test stack for the defined rules. * * @param rules */ run(rules: IRules<T>): Promise<boolean>; }