1.1.1 • Published 5 years ago

glimmer-boolean-helpers-polyfill v1.1.1

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

glimmer-boolean-helpers-polyfill

Build Status

Currently this is for glimmer applications only

This polyfill create template helpers for the commonly used ember-truth-helper boolean helpers. The included helpers are outlined in this RFC:

View tests at associated with travis badge here: tests/dummy/src/ui/components/Dummy/component-test.ts

To install:

Installation

ember install glimmer-boolean-helpers-polyfill

Usage

<!-- some-template.hbs !-->
{{#if (not false)}}
testing not
{{/if}}

{{#if (gt 2 1) }}
testing gt
{{/if}}

{{#if (gte 2 2) }}
testing gte
{{/if}}

{{#if (lt 2 1) }}
testing lt
{{/if}}

{{#if (lte 2 2) }}
testing lte
{{/if}}

{{#if (and true true) }}
testing and
{{/if}}

{{#if (eq 1 1)}}
testing eq
{{/if}}

{{#if (or false true)}}
testing or
{{/if}}