How to use the neo-async.mapSeries function in neo-async

To help you get started, we’ve selected a few neo-async examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github soomtong / blititor / module / notice / lib / database.js View on Github external
console.log('   inserted records...', result.insertId);

                        callback(null, result);
                    });
                };
                const resultAsync = function (err, result) {
                    console.log(' = Inserted default records...');

                    // for async
                    done && done(err, result);

                    // close connection
                    connection.destroy();
                };

                async.mapSeries(dummy, iteratorAsync, resultAsync);
            });
        }
github soomtong / blititor / module / app_store / lib / database.js View on Github external
callback(null, result);
                });
            };

            var resultAsync = function (err, result) {
                console.log(' = Inserted category records...');

                // for async
                done && done(err, result);

                // close connection
                connection.destroy();
            };

            async.mapSeries(dummy, iteratorAsync, resultAsync);
        }
    });
}
github IBM / ipfs-social-proof / src / remote-proofs.js View on Github external
if (!Array.isArray(proofArray) || !proofArray.length) {
      throw new Error('proofArray is a required argument')
    }

    async function process (item, callback) {
      // setTimeout(() => {
        // slow this down due to rate limits?
        return await that.processProofUrl(item.url,
                                          item.username,
                                          item.service,
                                          item,
                                          callback)
      // }, 250)
    }

    async.mapSeries(proofArray, process, (err, results) => {
      if (err) {
        console.error(err)
        return callback(err, results)
      }
      return callback(null, results)
    })
  }
}
github soomtong / blititor / module / teamblog / lib / database.js View on Github external
callback(err, result);
                    });
                };

                var resultAsync = function (err, result) {
                    console.log(' = Inserted default records...');

                    // for async
                    done && done(err, result);

                    // close connection
                    connection.destroy();
                };

                async.mapSeries(dummy, iteratorAsync, resultAsync);
            });
        }
github soomtong / blititor / module / reservation / lib / database.js View on Github external
console.log('   inserted records...', result.insertId);

                    callback(null, result);
                });
            };
            const resultAsync = function (err, result) {
                console.log(' = Inserted default records...');

                // for async
                done && done(err, result);

                // close connection
                connection.destroy();
            };

            async.mapSeries(dummy, iteratorAsync, resultAsync);
        }
    });
}
github soomtong / blititor / module / controller_hub / lib / database.js View on Github external
callback(null, result);
                });
            };

            var resultAsync = function (err, result) {
                console.log(' = Inserted controller records...');

                // for async
                done && done(err, result);

                // close connection
                connection.destroy();
            };

            async.mapSeries(dummy, iteratorAsync, resultAsync);
        }
    });
github soomtong / blititor / module / account / lib / database.js View on Github external
console.log('   inserted records...');

                    callback(err, result);
                });
            };
            const resultAsync = function (err, result) {
                console.log(' = Inserted default records...');

                // for async
                done && done(err, result);

                // close connection
                connection.destroy();
            };

            async.mapSeries(dummy, iteratorAsync, resultAsync);
        }
    });
}
github soomtong / blititor / module / teamblog / lib / database.js View on Github external
tag_related_post_id: insertPostResult['insertId'],
                        created_at: new Date()
                    };

                    insertTagRelatedPost(connection, tagRelatedPostData, function (err, result) {
                        done(err, result);
                    });

                    winston.info('Processed tag records...', affectedId);
                });
            };

            // going sync
            var tagList = teamblogData.tags.split(',');

            async.mapSeries(tagList, iteratorAsync, resultAsync);
        } else {
            callback(err, insertPostResult);
        }
    });
}
github soomtong / blititor / core / setup.js View on Github external
prompt.get(configScheme, function (err, result) {
            if (result && result.ask.toUpperCase() == 'YES') {
                // reset tables!
                async.mapSeries(moduleInfo, iteratorAsync, resultAsync);
            } else {
                console.log(' = Make database tables request canceled... \n');
            }

            connection.destroy();
        });
    });
github suguru03 / neo-async / perf / func-comparator / collections / sample.mapSeries.js View on Github external
'neo-async_v0': function(callback) {
    c = 0;
    neo_async_v0.mapSeries(array, iterator, callback);
  },
  'neo-async_v1': function(callback) {