TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
Forget about promises, use harvests
3 points
by
abss
over 11 years ago
Harvests: From now is possible to call asynchronous functions in a declarative way and to get almost the same experience as with synchronous code. https://github.com/salboaie/harvests
1 comment
abss
over 11 years ago
<a href="https://github.com/salboaie/harvests" rel="nofollow">https://github.com/salboaie/harvests</a><p>harvest.let('father', loadPenguin, 'MrPenguin'); harvest.let('mother', loadPenguin, 'MrsPenguin'); harvest.let('family', loadPenguinFamily, wait('father'), wait('mother'));<p>The above call do 3 calls without then or declaring ugly callbacks!