Skip to content

Commit

Permalink
Merge pull request #184 from Techn1x/patch-1
Browse files Browse the repository at this point in the history
Remove "short-circuit" disclaimer from readme
  • Loading branch information
SergeAstapov authored Aug 2, 2023
2 parents a5b589e + d97a408 commit 204629c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Helper | JavaScript | HTMLBars
eq | `if (a === b)` | `{{if (eq a b)}}` | No |
not-eq | `if (a !== b)` | `{{if (not-eq a b)}}` | No |
not | `if (!a)` | `{{if (not a)}}` | Yes |
and | `if (a && b)`* | `{{if (and a b)}}` | Yes |
or | <code>if (a &#124;&#124; b)</code> * | `{{if (or a b)}}`     | Yes |
xor | <code>if (a && !b &#124;&#124; !a && b)</code>* | `{{if (xor a b)}}` | No |
and | `if (a && b)` | `{{if (and a b)}}` | Yes |
or | <code>if (a &#124;&#124; b)</code> | `{{if (or a b)}}`     | Yes |
xor | <code>if (a !== b)</code> | `{{if (xor a b)}}` | No |
gt | `if (a > b)` | `{{if (gt a b)}}` | No |
gte | `if (a >= b)` | `{{if (gte a b)}}` | No |
lt | `if (a < b)` | `{{if (lt a b)}}` | No |
Expand All @@ -32,12 +32,6 @@ is-array | `if (Ember.isArray(a))` | `{{if (is-array a)}
is-empty | `if (Ember.isEmpty(a))` | `{{if (is-empty a)}}` | No |
is-equal | `if (Ember.isEqual(a, b))` | `{{if (is-equal a b)}}` | No |

<sup>
* Unlike their JavaScript counterparts, these expressions do <em>not</em> short circuit.
For example, with <code>(or a b)</code>, even if <code>a</code> is truthy, <code>b</code> will still be evaluated.
See <a href="https://github.com/jmurphyau/ember-truth-helpers/issues/58#issuecomment-319798732">this explanation</a>.
</sup>

## API

### is-equal
Expand Down

0 comments on commit 204629c

Please sign in to comment.