Skip to content

Instantly share code, notes, and snippets.

@handloomweaver
Forked from voltidev/coffee-tip.md
Last active August 29, 2015 14:24
Show Gist options
  • Save handloomweaver/d86b9a272127c1ebe8f4 to your computer and use it in GitHub Desktop.
Save handloomweaver/d86b9a272127c1ebe8f4 to your computer and use it in GitHub Desktop.
after = (ms, cb) -> setTimeout cb, ms
every = (ms, cb) -> setInterval cb, ms

Now we can say:

after 500, -> # do something...

Instead of:

setTimeout ->
    # do something..
, 500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment