0.1.4 • Published 9 years ago

promise-fu v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

Promise Fu

A small library providing helpers for working with promises and asynchronous programming.

Installation

npm install promise-fu

Example 1

    var c = new PromiseChain();
    return c.addResolver(f1)
        .addResolvers([f2, f3])
        .addResolver(f4)
        .then(function() {
            console.log("First ran f1, then f2 & f3 in parallel, then joined to run f4 and then finish.");
        });

Example 2

    var c = new PromiseChain();
    return c.addResolver(f1)
    	.fork()
        .addResolver(f2)
        .addResolver(f3)
        .join()
        .addResolver(f4)
        .then(function() {
        	console.log("First ran f1, then f2 & f3 in parallel, then joined to run f4 and then finish.");
        });

Tests

npm test

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago