Giter Club home page Giter Club logo

kdo's People

Contributors

hiowenluke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chailijia

kdo's Issues

What does this library provide over plain javascript?

I've looked through the documents and examples and I'm still unclear what this library provides over plain javascript. The amount of boilerplate seems mostly unchanged, but plain js is, inherently, easier to parse. Take the base example:

const foo = async () => {

// do something for task 1
// ...

// do something for task 2
// ...

// do something for task 3
// ...

// do something for task 4
// ...

}

What does kdo provide, over this solution:

const task1 = async (...args) => {
  ...
  return [ ...results ]
}

const task2 = async (...args) => {
  ...
  return [ ...results ]
}

const task3 = async (...args) => {
  ...
  return [ ...results ]
}

const task4 = async (...args) => {
  ...
  return [ ...results ]
}

const foo = async (...args) => {
  const result1 = await task1(...args)
  const result2 = await task2(...result1)
  const result3 = await task3(...result2)
  const result4 = await task4(...result3)

  return result4
}

The separate functions have the added advantage of being modularizable without cruft spread operations, unlike the flow object in the kdo examples.

Thanks!

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.