UNPKG

231 BJavaScriptView Raw
1
2
3 /**
4 * Calls closure only after callback is called x times
5 */
6 function after(closure, times){
7 return function () {
8 if (--times <= 0) closure();
9 };
10 }
11
12 module.exports = after;
13
14