mout/mout — pull request #74 by MathiasPaumgarten (2013-03-29 01:30:31+00:00)
Title: Propose: function/delay

Delay's are something I come across a lot in Front End development and I find JavaScripts `setTimeout` syntax rather cumbersome, especially when it comes to executing function within a certain context and arguments.

I wrote and tested this little helper `delay( fn, millis, context, [...args] ) : Number`. It returns the identifier from the timeout (e.g. `var identifier = setTimeout( ...`) that can be used to cancel the delay.

Now, I am not sure if that is part of the targeted field of __mout__ this is why I consider it a proposal.

Let me know what you think.

PS: I tried to keep the JavaScript style as closely to what I saw in mout so far. Refactors are always welcome.