Forget about promises, use harvests

3 points by abss ↗ HN
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

[ 3.5 ms ] story [ 16.7 ms ] thread
https://github.com/salboaie/harvests

harvest.let('father', loadPenguin, 'MrPenguin'); harvest.let('mother', loadPenguin, 'MrsPenguin'); harvest.let('family', loadPenguinFamily, wait('father'), wait('mother'));

The above call do 3 calls without then or declaring ugly callbacks!