
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
ember-reactive-helpers
Advanced tools
Collection of helpers to aid in reactive template programming with Ember.js
Collection of helpers to aid in reactive template programming with Ember.js.
ember install ember-reactive-helpers
Reactive helpers are helpers that return functions. These functions can be bound to event handlers to process data on the way up in the Data Down Actions Up cycle. The r
helper makes it possible to use ember-composable-helpers
in event handlers where execution of the helper is delayed until the event is triggered.
(r helper [arg1 arg2 ...])
Returns a function for a given helper and curries arguments to it.
<Input @value={{this.value}} {{on "keyup" (pipe (r "dasherize" this.value) (fn (mut this.value)))}} />
The r
helper accepts functions as helpers. For example, let's say you have a method in a Component named addNumbers
export default class extends Component {
addNumbers([a, b]) {
return a + b;
}
}
You can use it in the template.
<button type="button" {{on "click" (pipe (r this.addNumbers 1) (fn (mut this.count)))}}>+1</button>
<div>{{this.count}}</div>
(r/get propName)
The (r/get)
helper returns a function. When called, the function will return the value taken from the object that it receives as the first argument at property propName.
{{compute (r/get "animal") (hash animal="cat")}} {{! //=> cat }}
(r/param [index])
(r/param)
returns a function. When called, this function will return the received argument at the specified index.
{{compute (r/param) "hello" "world"}}
{{! //=> 'hello'}}
{{compute (r/param 1) "hello" "world"}}
{{! //=> 'world'}}
(r/debugger)
(r/debugger)
will create a helper that will inject a debugger breakpoint into a helper pipe.
It will pass through the value, that's passed into the helper.
<button {{action (pipe (some-helper) (r/debugger) (some-other-helper))}}>Do!</button>
(r/log ['your message'])
The (r/log)
helper will evaluate to a function. When called, this function will log the passed in message and arguments that it received.
<button {{action (pipe (r/log "before save") (action "save") (r/log "after save")) model}}>Save</button>
(r/tap value)
The (r/tap value)
helper will evaluate to a function that will return the passed in argument.
{{shhh anything}}
The {{shhh
helper will suppress any output that's passed into it. This is useful when you want to compute a helper
without having its output rendered.
(transition-to 'destination' model (query-params foo='bar'))
The (transition-to)
helper has the same argument signature as link-to
but evaluates to an action that can be called to trigger transition.
<button type="button" {{on "click" (transition-to "index")}}>Go to Index</button>
If you encounter a bug please open an issue on GitHub.
See the Contributing guide for details.
This project is licensed under the MIT License.
1.2.0
This is a minor release with no new features added.
FAQs
Collection of helpers to aid in reactive template programming with Ember.js
The npm package ember-reactive-helpers receives a total of 11 weekly downloads. As such, ember-reactive-helpers popularity was classified as not popular.
We found that ember-reactive-helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.