0.0.1 • Published 8 years ago
ember-observer-macros v0.0.1
ember-observer-macros
Adds few observer macros to avoid calling observer function to often
Importing/ Usage
import { observerOnce, observerDebounce, observerThrottle } from 'ember-observer-macros';
observerOnce
Calls observer function once in run loop
nameChanged: observerOnce('propName1', 'propName2', function() {})
observerDebounce
Debounces observer function
nameChanged: observerDebounce('propName1', 'propName2', function() {}, 200)
observerThrottle
Throttles observer function
nameChanged: observerThrottle('propName1', 'propName2', function() {}, 200)
Installation
ember install ember-observer-macros
0.0.1
8 years ago