0.18.0 • Published 5 years ago

global-wait v0.18.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

If you want to start multiple asynchronous processes from different places and then wait for them all to finish, global-wait can help.

Create a ticket that everyone else will wait on:

var ticket = wait.start("pack up")

Then various people can wait for things to finish:

wait(dontStray)

When you are done with your ticket, mark it finished:

wait.finish(ticket)

And then your callback will be called:

function dontStray() {
  console.log("They don't love you like i love you.")
}

If you want to wait on things to be finished in a different iframe:

wait.forIframe(".my-iframe", function() {
  console.log("my frame finished!")
})
0.18.0

5 years ago

0.17.0

5 years ago

0.16.0

5 years ago

0.15.0

6 years ago

0.14.0

6 years ago

0.13.0

7 years ago