How to use the everySeries function from async

Find comprehensive JavaScript async.everySeries code examples handpicked from public code repositorys.

193
194
195
196
197
198
199
200
201
});

migrator.list().then(
  function(migrations) {
    var migrationsRan = 0;
    async.everySeries(migrations, function(migration, callback) {
      if(migration.state === 'up'){
        return callback();
      }
fork icon268
star icon0
watch icon1

39
40
41
42
43
44
45
46
47
48
logger.debug(`\n\n\nAdd new consenter config to raft service", Channel: ${channel}`, newOrderer, '\n\n\n');
let wwwPort = newOrderer.wwwPort;
const orgMspPath = path.join(cfg.TMP_DIR, 'ordererOrganizations', `${newOrderer.domain || cfg.domain}`);

if (certFiles) {
    await async.everySeries(certFiles, async certFile => {
        await mspManager.unpackMsp(certFile, orgMspPath);
    })
    wwwPort="0"
}
fork icon28
star icon27
watch icon4

143
144
145
146
147
148
149
150
151
152
    })
  })
}
async everySeries(coll, iteratee) {    
  return new Promise(async (resolve, reject) => { 
    async.everySeries(coll, iteratee, (err, res) => {
      if (err) { 
        reject(err)
      } else {
        resolve(res)
fork icon1
star icon0
watch icon1

+ 21 other calls in file

29
30
31
32
33
34
35
36
37
38
  return;
}
var ccTransactions = [];
self.node.log.info(`[CC-API] got block ${blockHeight} with ${block.transactions.length} txs`)
// Loop through every transaction in the block to find colorecoins data
async.everySeries(block.transactions, function (tx, cb) {
  if (self.node.stopping) {
    self.litecoindSyncing = false;
    callback(null, false);
    return;
fork icon0
star icon0
watch icon4

+ 3 other calls in file

116
117
118
119
120
121
122
123
124
125
HelperMongo.prototype.validateNonExistenceWithMsg = function(collName, validate, cb) {
    var self = this;
    if (validate && validate.constructor == Object) {
        validate = [validate]
    }
    sh_async.everySeries(
        validate,
        function(condition, cb1) {
            self.sh_db.collection(collName).findOne(condition.query, function(err, result) {
                if (result) {
fork icon0
star icon0
watch icon2