Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ember-functions-as-helper-polyfill

ember-polyfills220kMIT2.1.3TypeScript support: included

Implementation of RFC 756, Default Helper Manager

ember-addon

readme

ember-functions-as-helper-polyfill

npm version CI

Use plain functions as helpers. Polyfill for RFC: 756 | Default Helper Manager. On Ember.js versions with native support for the feature (4.5+), this addon is inert.

Compatibility

  • Ember.js v3.25 or above
  • Ember CLI v3.25 or above
  • ember-auto-import v1 or above

Installation

ember install ember-functions-as-helper-polyfill

Usage

Define a function (doesn't have to be in a component)

import Component  from '@glimmer/component';

export default class MyComponent extends Component {
  myHelper = x => x * 2;
}
{{this.myHelper 3}}
^ prints 6

Named arguments will all be grouped together in the last argument of the helper:

import Component  from '@glimmer/component';

export default class MyComponent extends Component {
  doStuff = (x, options) => {
    console.log(x, options.optionA, options.optionB);
  };
}
{{this.doStuff 3 optionA=2 optionB=3}}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

changelog

Changelog

Release (2025-05-06)

  • ember-functions-as-helper-polyfill 2.1.3 (patch)

:bug: Bug Fix

  • ember-functions-as-helper-polyfill

:house: Internal

Committers: 2

2.1.2 (2023-08-03)

Bug Fixes

2.1.1 (2022-05-01)

Bug Fixes

  • inert: update when this polyfill becomes inert (4797f5c)

2.1.0 (2022-04-14)

Features

  • make inert when ember-source supports default helper manager (0e98b0f)

2.0.1 (2022-02-04)

Bug Fixes

  • deps: update dependency ember-cli-typescript to v5 (38084b6)

2.0.0 (2022-01-30)

chore

BREAKING CHANGES

  • copy real implementation this changes the behavior of the options arg to enable optional positional params when options are not used. See the RFC update for more details. https://github.com/emberjs/rfcs/pull/756

1.0.15 (2022-01-26)

Bug Fixes

  • deps: do not depend on unneeded packages (442696d)

1.0.14 (2022-01-19)

Bug Fixes

  • deps: update embroider monorepo to v1 (1376433)

1.0.13 (2022-01-14)

Bug Fixes

  • deps: update embroider monorepo to ^0.50.2 (5a96c7c)

1.0.12 (2022-01-13)

Bug Fixes

  • deps: update embroider monorepo to ^0.50.1 (7807cdd)

1.0.11 (2022-01-08)

Bug Fixes

  • deps: update embroider monorepo to ^0.50.0 (a66d4f0)

1.0.10 (2021-12-22)

Bug Fixes

  • deps: update dependency ember-cli-babel to ^7.26.11 (ec2d3d0)

1.0.9 (2021-12-21)

Bug Fixes

  • deps: update embroider monorepo to ^0.49.0 (8769559)

1.0.8 (2021-12-17)

Bug Fixes

  • deps: update dependency ember-cli-babel to ^7.26.10 (512e369)

1.0.7 (2021-12-16)

Bug Fixes

  • deps: update dependency ember-cli-babel to ^7.26.8 (2fb6f84)

1.0.6 (2021-12-09)

Bug Fixes

  • deps: update embroider monorepo to ^0.48.1 (dade0a1)

1.0.5 (2021-12-08)

Bug Fixes

  • deps: update embroider monorepo to ^0.48.0 (a3ca6ad)

1.0.4 (2021-12-05)

Bug Fixes

  • deps: update dependency ember-cli-htmlbars to ^6.0.1 (2d2a840)

1.0.3 (2021-11-16)

Bug Fixes

  • deps: update dependency ember-cli-htmlbars to v6 (f423f1d)

1.0.2 (2021-11-16)

Bug Fixes

  • deps: update dependency ember-auto-import to v2 (edab058)

1.0.1 (2021-11-15)

Bug Fixes

  • readme: specify 'this' in helper usages (8250105)
  • remove post install script (fc68d30), closes #13

1.0.0 (2021-11-15)

Bug Fixes

  • readme: correct supported ember versions (8858521)

Features

BREAKING CHANGES

  • implement default helper manager polyfill