How to use the settle function from bluebird
Find comprehensive JavaScript bluebird.settle code examples handpicked from public code repositorys.
52 53 54 55 56 57 58 59 60 61
}); } else if (_.isObject(myRequests)) { var keys = _.keys(myRequests); return Promise.settle(wrapped).then(function(settledValues) { var resolved = _.zipObject(keys, getSettledValues(settledValues)); return Promise.resolve(resolved); }); }
5
56
1
+ 3 other calls in file
GitHub: TruenoDB/trueno
5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006
debug.deprecated(".settle()", ".reflect()"); return new SettledPromiseArray(promises).promise(); }; Promise.prototype.settle = function () { return Promise.settle(this); }; }; },{"./util":36}],31:[function(_dereq_,module,exports){
3
16
0
GitHub: bvschwartz/nock-step
5705 5706 5707 5708 5709 5710 5711 5712 5713 5714
} } resources[i] = resource; } var promise = Promise.settle(resources) .then(inspectionMapper) .then(function(vals) { promise._pushContext(); var ret;
2
11
0
+ 3 other calls in file
4901 4902 4903 4904 4905 4906 4907 4908 4909 4910
resource._setDisposable(disposer); } resources[i] = resource; } return Promise.settle(resources) .then(inspectionMapper) .spread(fn) ._then(disposerSuccess, disposerFail, void 0, resources, void 0); };
1
2
1
171 172 173 174 175 176 177 178 179 180
return _tag; })); }); return Promise.settle(ops); }, importPosts: function importPosts(tableData, transaction) { if (!tableData) {
0
1
0
+ 3 other calls in file
167 168 169 170 171 172 173 174 175 176
_.each(data.data[tableName], function (importValues) { validateOps.push(validation.validateSchema(tableName, importValues)); }); }); return Promise.settle(validateOps).then(function (descriptors) { var errorList = []; _.each(descriptors, function (d) { if (d.isRejected()) {
0
1
0
39 40 41 42 43 44 45 46 47 48
} // Import users, deduplicating with already present users userOps = utils.importUsers(tableData.users, users, t); return Promise.settle(userOps).then(function (descriptors) { descriptors.forEach(function (d) { if (d.isRejected()) { errors = errors.concat(d.reason()); } else {
0
1
0
GitHub: amoxuk/stf-dev
486 487 488 489 490 491 492 493 494 495
}) frameProducer.on('readable', function next() { var frame = frameProducer.nextFrame() if (frame) { Promise.settle([broadcastSet.keys().map(function(id) { return broadcastSet.get(id).onFrame(frame) })]).then(next) } else {
0
1
0
1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377
test('new Promise -> settle', function (t) { t.plan(6) twice(function () { var trans = ins.startTransaction() Promise.settle([resolved('foo')]).then(function (result) { t.strictEqual(result.length, 1) t.ok(result[0].isFulfilled()) t.strictEqual(ins.currTransaction().id, trans.id) })
1
0
1
+ 2 other calls in file
bluebird.reject is the most popular function in bluebird (2988 examples)