µP.js
A agnostic and lightweight javascript promise library.
Methods
uP.resolve( arguments );uP.then( callback );
var p = new uP();
function get(data) {
setTimeout(function(){
p.resolve(data);
}, 500);
return p;
};
get('Knowledge!')
.then(function(data) {
alert(data);
return get('Money!');
})
.then(function(data) {
alert(data);
});Bower
bower install up.js