0.0.3 • Published 7 years ago

ember-handlebars-conditions v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

ember-handlebars-conditions

It is a Ember addon to allow more flexibility on the conditional manipulation in handlebars (such as: equal, less than, greater than, isEmpty, etc)

Installation

  • ember install ember-handlebars-conditions

Usage

HelperLogicSyntaxRemarks
eqif (a==b){{ if (eq a b) }}Non-strict comparison
seqif (a===b){{ if (seq a b) }}Strict comparison
notif (!a){{ if (not a) }}---
gtif (a > b){{ if (gt a b) }}---
gteif (a >= b){{ if (gte a b) }}---
ltif (a < b){{ if (lt a b) }}---
lteif (a <= b){{ if (lte a b) }}---
andif (a && b){{ if (and a b) }}---
orif (a || b){{ if (or a b) }}---
xorif (!a && b || !b && a){{ if (xor a b) }}---
isBlankif (Ember.isBlank(a)){{ if (isBlank a) }}---
isEmptyif (Ember.isEmpty(a)){{ if (isEmpty a) }}---
isNoneif (Ember.isNone(a)){{ if (isNone a) }}---

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.