Skip to content

Commit eb6b0b3

Browse files
authored
#86: Docs for Empty and NotEmpty conditions
1 parent 28c6390 commit eb6b0b3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/35-ObjectFilter-class.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ The filter has a stack of AND conditions and a stack of OR conditions. The filte
3636

3737
Conditions are by default added to the AND stack. The stack to use is set by calling `myFilter.and()` and `myFilter.or()`.
3838

39-
There are seven types of conditions that can be added:
39+
There are nine types of conditions that can be added:
4040

4141
* `myFilter.addFilterCondition(filter)` adds another filter as a condition, allowing complex hierarchies of conditions. The condition is fulfilled if the added filter is fulfilled.
4242
* `myFilter.addEqualsCondition(condition)` requires that the stated object property should match the stated value, or one of several stated values. On the form `{a: 3}` or `{a: [2, 3, 5]}`.
4343
* `myFilter.addNotEqualsCondition(condition)` requires that the stated object property should different from the stated value, or from all of several stated values. On the form `{a: 3}` or `{a: [2, 3, 5]}`.
44+
* `myFilter.addEmptyCondition(condition)` requires that the stated object property is `undefined`, `null`, `false`, an empty array or an empty string. The condition is provided as the name of the property (as a string).
45+
* `myFilter.addNotEmptyCondition(condition)` requires that the stated object property is _not_ `undefined`, `null`, `false`, an empty array or an empty string. The condition is provided as the name of the property (as a string).
4446
* `myFilter.addGreaterThanCondition(condition)` requires that the stated object property is higher than the stated value. On the form `{a: 3}`.
4547
* `myFilter.addGreaterOrEqualCondition(condition)` requires that the stated object property is higher than or equal to the stated value. On the form `{a: 3}`.
4648
* `myFilter.addLessThanCondition(condition)` does what you expect from the pattern above.

0 commit comments

Comments
 (0)