Constructs a promise for an object whose values are promises.

npm install then-all-in
8 downloads in the last day
21 downloads in the last week
33 downloads in the last month


then-all-in is an object-aware variant of then-all. The allIn function returns a promise that is fulfilled with a new object containing the fulfillment value of each object member, or rejected with the same reason as the first rejected promise. This form can be helpful for conditionally queueing asynchronous operations.

$ npm i then-all-in


var allIn = require('then-all-in');

app.patch('/account/:id', function(request, response, next) {
    var changes = {},
        body = request.body;

    // Assume `Account.get` constructs a promise for an account model.
    var account = Account.get(;

    if ( != {
        // Assume `#setEmail()` is asynchronous. = account.setEmail(;

    if ( != { = account.setPhone(;

    allIn(changes).done(function() {
    }, next);



npm loves you