From 1631a972501f986797e0132d0b6fbaca25c0e128 Mon Sep 17 00:00:00 2001 From: yuxblank Date: Sat, 7 Nov 2020 01:05:50 +0100 Subject: [PATCH] docs: improved readme with examples --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 62c5162..9e4e949 100644 --- a/README.md +++ b/README.md @@ -38,15 +38,15 @@ with npm: npm i rulerx ``` -### Writing basic rule +### Writing basic rules -First, let's define one model of our context. +First, let's define one model of our context ```ts -class Person {name: string; surname: string } +interface Person {name: string; surname: string } ``` -Then lets defines our rule sets: +Then we define our rule sets ```ts const rules: RuleSet[] = [ @@ -95,7 +95,7 @@ new RuleRx() }) ``` -This will emit : +Since only *Jhon Doe* match **all** the rules (equal $.name && equal $.surname) this will emit: ``` { name : "Jhon",