Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 1.08 KB

README.md

File metadata and controls

39 lines (21 loc) · 1.08 KB

ember-observer-macros Ember Observer Score npm version travis status

Adds few observer macros to avoid calling observer function too 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