Skip to content

Ember.js helper functions to allow conditional manipulation in handlebars

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

seeseesky/ember-handlebars-conditions

Repository files navigation

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

Helper Logic Syntax Remarks
eq if (a==b) {{ if (eq a b) }} Non-strict comparison
seq if (a===b) {{ if (seq a b) }} Strict comparison
not if (!a) {{ if (not a) }} ---
gt if (a > b) {{ if (gt a b) }} ---
gte if (a >= b) {{ if (gte a b) }} ---
lt if (a < b) {{ if (lt a b) }} ---
lte if (a <= b) {{ if (lte a b) }} ---
and if (a && b) {{ if (and a b) }} ---
or if (a || b) {{ if (or a b) }} ---
xor if (!a && b || !b && a) {{ if (xor a b) }} ---
isBlank if (Ember.isBlank(a)) {{ if (isBlank a) }} ---
isEmpty if (Ember.isEmpty(a)) {{ if (isEmpty a) }} ---
isNone if (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/.

About

Ember.js helper functions to allow conditional manipulation in handlebars

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published