3.0.2 • Published 9 years ago

mops v3.0.2

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

mops

The operation queue.

Build Status NPM version Dependency Status devDependency Status Code Climate Test Coverage Inline docs

var action1 = new mops.Action(function() {
    return Promise.reject(new mops.Error('blablabla'));
});

var action2 = new mops.Action(function() {
    return new mops.Queue(this)
        .then(action1)
        .then(action2)
        .then(action3);
});

var action3 = new mops.Action(function() {
    return new Promise(function(resolve) {
        resolve(
            new mops.Queue(this)
                .then(action1)
                .then(action2)
                .then(action3)
                .start()
        );
    });
});

new mops.Queue(new mops.Context({ /* ... */ }))
    .then(action1, param1, param2)
    .then(action2, action3)
    .catch(action4)
    .always(action5)
    .then(function() {}, function() {})
    .catch(function() {})
    .then(function() {
        return new mops.Queue(this)
            .then(action1)
            .then(action2);
    })
    .start();

Install

npm install mops
bower install mops

NPM NPM

3.0.2

9 years ago

2.0.4

9 years ago

2.0.2

9 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago