GithubHelp home page GithubHelp logo

Implement an async flow about futil-js HOT 4 CLOSED

sadasant avatar sadasant commented on August 20, 2024
Implement an async flow

from futil-js.

Comments (4)

sadasant avatar sadasant commented on August 20, 2024

Here's a working version made by a friend: const asyncFlow = (...fns) => x => fns.reduce((v, f) => v.then(f), Promise.resolve(x))

from futil-js.

daedalus28 avatar daedalus28 commented on August 20, 2024

Ramda has stuff like pipeP and composeP, but interestingly they're considering removing it:

ramda/ramda#1869

from futil-js.

daedalus28 avatar daedalus28 commented on August 20, 2024

This is covered by #411
It also allows for automatic Promise.all/promiseProps calls so you can generally just flow together anything async and it will work without thinking about promises. flowAsyncDeep is wonderfully magical. It also only becomes async if necessary, so you can use if safely in sync scenarios without needing an extra await.

from futil-js.

daedalus28 avatar daedalus28 commented on August 20, 2024

flowAsync is publishing in 1.74.0 right now 😄

from futil-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.