Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update docs for cmp -> comparator

  • Loading branch information...
commit 772e04707bbeef5b5bad814c0d50bf8125b4e528 1 parent 69b23f2
Garrett Johnson authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
10 README.md
@@ -12,7 +12,7 @@ npm install ruler
## Usage
-Ruler is meant for just simple, top-down testing; there is not need or desire to have a nested trees of "child" conditions, etc. You can build your tests via progamatically, or an array of objects with `cmp`, `path` and `value` properties. The later of the two is ugly, but might be handy if you need to store the "rules" in a database or something.
+Ruler is meant for just simple, top-down testing; there is not need or desire to have a nested trees of "child" conditions, etc. You can build your tests via progamatically, or an array of objects with `comparator`, `path` and `value` properties. The later of the two is ugly, but might be handy if you need to store the "rules" in a database or something.
*Build assertions programatically:*
@@ -64,10 +64,10 @@ var obj = {
};
var filters = [
- { cmp: 'is', path: 'name.first', value: 'john' },
- { cmp: 'not', path: 'name.last', value: 'buzz' },
- { cmp: 'contains', path: 'company', value: 'red' },
- { cmp: 'gte', path: 'number', value: 75 }
+ { comparator: 'is', path: 'name.first', value: 'john' },
+ { comparator: 'not', path: 'name.last', value: 'buzz' },
+ { comparator: 'contains', path: 'company', value: 'red' },
+ { comparator: 'gte', path: 'number', value: 75 }
];
var engine = ruler(filters);
Please sign in to comment.
Something went wrong with that request. Please try again.