How to use the neo-async.eachSeries 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 liquidcarrot / carrot / src / neuron.new.js View on Github external
async.timesSeries(times, (n, callback) => {
    async.eachSeries(data, (d, callback) => {
      async.series([
        (callback) => activate(d.inputs, callback),
        (callback) => propagate(d.outputs, callback),
        (callback) => {
          console.log("Trained"); 
          callback()
        },
        (callback) => {
          console.log(h[0].connections.incoming[0].weight + " " + h[0].connections.incoming[1].weight + " " 
                      + h[1].connections.incoming[0].weight + " " + h[1].connections.incoming[1].weight)
//           console.log(_.last(o[0].outputs).s + " " + _.last(o[0].outputs).e + " " + _.last(o[0].outputs).d)
//           console.log(_.last(o[1].outputs).s + " " + _.last(o[1].outputs).e + " " + _.last(o[1].outputs).d)
          console.log()
          callback()
        },
      ], callback)
github shopgate / platform-sdk / lib / app / frontend / rapidDevServer / commandApi.js View on Github external
const commandApi = (req, res, next) => /* istanbul ignore next */{
  const { cmds } = req.body

  if (cmds && cmds.length !== 0) {
    let responseCommands = []

    async.eachSeries(cmds, (command, callback) => {
      const commandHandler = require(`./appCommands/${command.c}`)

      if (!commandHandler) {
        return callback(new Error(t('COMMAND_NOT_FOUND', { command: command.c })))
      }

      commandHandler(command.p, (error, commands) => {
        if (error) {
          return callback(error)
        }

        responseCommands = responseCommands.concat(commands)
        callback()
      })

      return null
github elmadev / elmaonline-site / src / ranking.js View on Github external
return new Promise(resolve => {
    const newRankings = { all: {}, year: {}, month: {}, week: {}, day: {} };
    const history = [];
    let updatedCurrent = cloneDeep(current);
    // get battle results for selected battles
    eachSeries(getBattleList, battleResults, () => {
      // loop battles
      forEach(Results, result => {
        // skip 1htt, multi and ints
        if (skippedBattles(result.battle)) {
          return;
        }
        if (result.result.length > 0) {
          // loop results
          forEach(result.result, (r, place) => {
            // skip designer
            if (r.KuskiIndex === result.battle.KuskiIndex) {
              return;
            }
            // add ranking for all time
            newRankings.all[r.KuskiIndex] = addRanking(
              updatedCurrent.all,
github elmadev / elmaonline-site / src / ranking.js View on Github external
return new Promise(resolve => {
    eachSeries(newRankings.all, updateOrCreateKinglist, () => {
      eachSeries(newRankings.year, updateOrCreateKinglistYearly, () => {
        eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
          eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
            eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
              resolve();
            });
          });
        });
      });
    });
  });
}
github elmadev / elmaonline-site / src / ranking.js View on Github external
eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
            eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
              resolve();
            });
          });
        });
github elmadev / elmaonline-site / src / ranking.js View on Github external
eachSeries(newRankings.year, updateOrCreateKinglistYearly, () => {
        eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
          eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
            eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
              resolve();
            });
          });
        });
      });
    });
github elmadev / elmaonline-site / src / ranking.js View on Github external
eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
          eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
            eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
              resolve();
            });
          });
        });
      });
github elmadev / elmaonline-site / src / ranking.js View on Github external
eachSeries(newRankings.all, updateOrCreateKinglist, () => {
      eachSeries(newRankings.year, updateOrCreateKinglistYearly, () => {
        eachSeries(newRankings.month, updateOrCreateKinglistMonthly, () => {
          eachSeries(newRankings.week, updateOrCreateKinglistWeekly, () => {
            eachSeries(newRankings.day, updateOrCreateKinglistDaily, () => {
              resolve();
            });
          });
        });
      });
    });
  });
github suguru03 / neo-async / perf / func-comparator / collections / sample.eachSeries.js View on Github external
'neo-async_v0': function(callback) {
    neo_async_v0.eachSeries(array, iterator, callback);
  },
  'neo-async_v1': function(callback) {