Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

promiseDAG

JavaScript has the method Promise.all() that allows one to create a promise that resolves when all of a list of promises have been resolved. This project offers a more powerful version that roughly speaking allows one to specify

  • a list of promises, and
  • dependencies between them,

and create a single promise that resolves when the entire network of promises has been resolved.

How to use

The project's code is a single function (promiseDAG) in a single file (promiseDAG.js). Just add this file to your JavaScript project, and call the promiseDAG function.

An illustrated explanation of what promiseDAG does can be found at https://daanmichiels.github.io/promiseDAG/.

You can see a demo at https://daanmichiels.github.io/promiseDAG/demo/.

Read more

At some point, I wrote up a short article about promiseDAG at The Code Project. You can find it here.

License

This project is released under the LGPL-3.0.

About

Generalization of JavaScript's Promise.all() to directed acyclic graphs

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Contributors

Languages