3 ms·
Forget about promises, use harvests
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
- abss 13y agohttps://github.com/salboaie/harvests 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!