ilagnev / waitress.js

A lean JS library that makes waiting on a collection of async calls less painful

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

waitress.js

A lean JS library that makes waiting on a collection of async calls less painful.

Example:

var bootup = new Waitress();

$.ajax({
  type: "GET",
  url: "/api/notifications"
}).done(function(response) {
	bootup.add('notifications');
});

$.ajax({
  type: "GET",
  url: "/api/messages"
}).done(function(response) {
   bootup.add('messages');
});

bootup.when(['notifications', 'messages'], function(){
  console.log('All async calls are done');
});

About

A lean JS library that makes waiting on a collection of async calls less painful

License:MIT License


Languages

Language:JavaScript 100.0%