0.2.0 • Published 7 years ago

rsvp-backlog v0.2.0

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

rsvp-backlog

Build status

var backlog = RSVP.createBacklog();

backlog.add(somePromise);

// Access a promise in the backlog directly

backlog.toArray()[0].then(doSomething);

// The promise behind .whenClear() resets when the backlog size goes from zero 
// to one, so you need at least one promise before you can call it

backlog.whenClear().then(doSomethingElse);

// Callback functions can be passed to handle additions, removals and 
// resolutions

backlog.whenChanged(function () {

    // The callback is bound to the backlog

    renderBacklogProgress(this.toArray().length);

});

// Resolving or removing the last promise in the backlog resolves the backlog
// as a whole

backlog.remove(somePromise);

Bower installation

From a terminal:

bower install rsvp-backlog

In your HTML:

<script src="bower_components/rsvp-backlog/rsvp-backlog.min.js">

Node installation

From a terminal:

npm install rsvp-backlog

In your script:

var createBacklog = require('rsvp-backlog'),
    backlog = createBacklog();
0.2.0

7 years ago

0.1.0

8 years ago

0.0.0

9 years ago