Unfinished and not tested beyond my own case.
Usage
var wait = new Wait();
wait.complete(function () {
console.log('we are done - now report');
});
$.get(url, wait.until(function (data) {
// do something with data
});
db.users.find(wait.until(function (err, docs) {
// we've found users in the mongo db
}));
Also - I'm not using jQuery - because I'm in Node.js.