You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 3, 2020. It is now read-only.
saint.offer(val);// return a promise.resolvesaint.bless(fun);// place a promise on the queuesaint.miracle(fun);// runs when your promises is finishedsaint.lifeGoesOn(fun);// runs when your promises has failedsaint.pray(fun,err);// execute all your promises on queue
Examples
constp1=x=>x+1;constp2=x=>x*2;// passing initial value through the functionssaint.offer(1)// val is 1.bless(p1)// val is 2.bless(p2)// val is 4// .miracle()// .lifeGoesOn().pray((x)=>{console.log(x);// result is 4});
constp1=()=>console.log('p1');constp2=()=>console.log('p2');// creating an array of promisessaint.bless(p1).bless(p2).miracle(()=>console.log('A Miracle happened.')).lifeGoesOn(()=>console.log('Your faith is not enough.')).pray();