Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-functions-as-helper-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-functions-as-helper-polyfill

Implementation of RFC 756, Default Helper Manager

  • 2.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
50K
increased by12.51%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 03 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc