0.1.0 • Published 8 years ago
ember-runloop-helpers v0.1.0
ember-runloop-helpers
An add-on that provides runloop related helpers.
Installation
ember install ember-runloop-helpersUsage
There are two helpers with the same usage: runloop/debounce, runloop/throttle
<input oninput={{action (runloop/debounce (action (mut foo)) 1000) value='target.value'}}>
<div>{{foo}}</div>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.
Reference
{{runloop/debounce <method> <wait> [...args] [immediate=false]}}
{{runloop/throttle <method> <spacing> [...args] [immediate=false]}}Contributing
Installation
git clone https://github.com/ember-sapporo/ember-runloop-helpers.gitcd ember-runloop-helpersyarn install
Linting
yarn lint:jsyarn lint:js --fix
Running tests
ember test– Runs the test suite on the current Ember versionember test --server– Runs the test suite in "watch mode"yarn test– Runsember try:eachto test your addon against multiple Ember versions
Running the dummy application
ember serve- Visit the dummy application at http://localhost:4200.
For more information on using ember-cli, visit https://ember-cli.com/.
License
This project is licensed under the MIT License.
0.1.0
8 years ago