Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flowAsync #411

Merged
merged 12 commits into from
Mar 26, 2023
Merged

flowAsync #411

merged 12 commits into from
Mar 26, 2023

Conversation

daedalus28
Copy link
Contributor

@daedalus28 daedalus28 commented Mar 23, 2023

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.

  • Add flowAsync and promiseProps
  • Add flowAsyncDeep and resolveOnTree
  • Pass along all tree iteratee props in writeTreeNode (default writeNode for tree maps) and rename interally from writeProperty to writeTreeNode

Resolves #400 and #107

@daedalus28 daedalus28 self-assigned this Mar 23, 2023
@decrapifier
Copy link
Contributor

decrapifier commented Mar 23, 2023

Warnings
⚠️

Branch being merged does not follow Git Flow

Messages
📖 Could not find any browser results.

Generated by 🚫 dangerJS against 093549d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full promises async/await functionality to lodash
2 participants