Skip to content

Instantly share code, notes, and snippets.

@katspaugh
Created June 28, 2011 11:48
Show Gist options
  • Save katspaugh/1050978 to your computer and use it in GitHub Desktop.
Save katspaugh/1050978 to your computer and use it in GitHub Desktop.
until.js
function until(cond, callback, delay) {
(function fn() {
cond() ? callback() : setTimeout(fn, delay)
})()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment