From b3fff4dd06e97c349bb652435c97954e05b36bbc Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 27 Jun 2014 17:16:27 +0200 Subject: [PATCH] Add debounce function to taiga utils collection. --- app/coffee/utils.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/coffee/utils.coffee b/app/coffee/utils.coffee index 04f47f8e..d829ef38 100644 --- a/app/coffee/utils.coffee +++ b/app/coffee/utils.coffee @@ -85,6 +85,10 @@ joinStr = (str, coll) -> return _.str.join(str, coll) +debounce = (wait, func) -> + return _.debounce(func, wait) + + taiga = @.taiga taiga.bindOnce = bindOnce taiga.mixOf = mixOf @@ -95,3 +99,4 @@ taiga.timeout = timeout taiga.scopeDefer = scopeDefer taiga.toString = toString taiga.joinStr = joinStr +taiga.debounce = debounce