hiowenluke / kdo Goto Github PK
View Code? Open in Web Editor NEWEasily organize functions or files, make the code clear, easy to read and maintain.
License: MIT License
Easily organize functions or files, make the code clear, easy to read and maintain.
License: MIT License
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.