From 7d77a6c9b54b945a8fbbc98911153417d80c33d1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 25 Jun 2014 23:02:02 +0200 Subject: [PATCH] Add self defined timeout function like setTimeout but with inverted arguments. --- app/coffee/utils.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/coffee/utils.coffee b/app/coffee/utils.coffee index 4b7fe2bf..16ff483f 100644 --- a/app/coffee/utils.coffee +++ b/app/coffee/utils.coffee @@ -57,9 +57,14 @@ groupBy = (coll, pred) -> return result + +timeout = (wait, continuation) -> + return window.setTimeout(continuation, wait) + taiga = @.taiga taiga.bindOnce = bindOnce taiga.mixOf = mixOf taiga.trim = trim taiga.toggleText = toggleText taiga.groupBy = groupBy +taiga.timeout = timeout