Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am SimoKutlin on github.
  • I am leniceguy (https://keybase.io/leniceguy) on keybase.
  • I have a public key whose fingerprint is 1E5B C563 7819 A16E 8B3D 8DA9 5954 7108 6C1C 35F2

To claim this, I am signing this object:

@SimoKutlin
SimoKutlin / util.js
Last active April 3, 2017 11:05
Helper function for looping async operations
asyncLoop(iterations, number, callback) {
let index = 0;
let done = false;
let loop = {
next: function() {
if (done) {
return;
}
if (index < iterations) {
index++;