smartprocure / futil-js

F(unctional) util(ities). Resistance is futile.
https://smartprocure.github.io/futil-js/
MIT License
991 stars 68 forks source link

`flowAsync` #411

Closed daedalus28 closed 1 year ago

daedalus28 commented 1 year ago

Long overdue. flowAsync is magical. You can mix and match sync and async, automatically get Promise.all and promiseProps for arrays and objects, and it'll stay sync if nothing is async (e.g. you don't need to await if nothing is async).

flowAsyncDeep is even more magical. It uses the new resolveOnTree method to resolve deep tree structures, so it will work even if you're doing really deep promises (e.g. using an async iteratee in _.update deep in your structure). It's a separate method because traversing the entire object graph is a performance tradeoff we think is worth surfacing to end users. It's possible that we'll deprecate it and make it the default behavior for flowAsync in a future release if the performance hit is generally not noticeable.

Resolves #400 and #107

decrapifier commented 1 year ago
Warnings
:warning: Branch being merged does not follow [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/)
Messages
:book: Could not find any browser results.

Generated by :no_entry_sign: dangerJS against 093549d2ae3a99c8b8ba359b0b6e702b99a32223