An add-on that provides runloop related helpers.
- Ember.js v3.4 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
ember install ember-runloop-helpers
There are two helpers with the same usage: runloop/debounce
, runloop/throttle
This will debounce (action (mut foo))
with a wait of 1000 miliseconds. If an element is destroyed while waiting for execution, it will automatically cancel the timer.
{{runloop/debounce <method> <wait> [...args] [immediate=<boolean>]}}
{{runloop/throttle <method> <spacing> [...args] [immediate=<boolean>]}}
See the Contributing guide for details.
This project is licensed under the MIT License.