Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

ember-truth-helpers

> 编程语言
Open source

Ember HTMLBars Helpers for {{if}} & {{unless}}: not, and, or, eq & is-array

702 stars0 likes0 views
WebsiteGitHub

About

Ember HTMLBars Helpers for {{if}} & {{unless}}: not, and, or, eq & is-array

Ember Truth Helpers

HTMLBars template helpers for additional truth logic in if and unless statements.

Compatibility

  • Ember.js v4.8 or above
  • Embroider or ember-auto-import >= 2 (this is v2 addon)

Installation

ember install ember-truth-helpers

Usage

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).

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言