Ember HTMLBars Helpers for {{if}} & {{unless}}: not, and, or, eq & is-array
Ember HTMLBars Helpers for {{if}} & {{unless}}: not, and, or, eq & is-array
HTMLBars template helpers for additional truth logic in if and unless statements.
ember install ember-truth-helpers
| Helper | JavaScript | HTMLBars | Import | Variable argument count allowed |
|---|---|---|---|---|
| eq | if (a === b) |
{{if (eq a b)}} |
import { eq } from 'ember-truth-helpers'; | No |
| not-eq | if (a !== b) |
{{if (not-eq a b)}} |
import { notEq } from 'ember-truth-helpers'; | No |
| not | if (!a) |
{{if (not a)}} |
import { not } from 'ember-truth-helpers'; | Yes |
| and | if (a && b) |
{{if (and a b)}} |
import { and } from 'ember-truth-helpers'; | Yes |
| or | if (a || b) | {{if (or a b)}} |
import { or } from 'ember-truth-helpers'; | Yes |
| xor | if (a !== b) | {{if (xor a b)}} |
import { xor } from 'ember-truth-helpers'; | No |
| gt | if (a > b) |
{{if (gt a b)}} |
import { gt } from 'ember-truth-helpers'; | No |
| gte | if (a >= b) |
{{if (gte a b)}} |
import { gte } from 'ember-truth-helpers'; | No |
| lt | `if (a | |||
| {{#if (or @admin @user)}} |
Admin Controls are going here
{{/if}}
## Contributing
See the [Contributing](CONTRIBUTING.md) guide for details.
## License
This project is licensed under the [MIT License](LICENSE.md).
No open issues yet, or sync has not completed.