How to use the async-es.series function in async-es

To help you get started, we’ve selected a few async-es 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 mflorence99 / el-aws / renderer / app / pages / ddb / services / ddb.ts View on Github external
deleteItems(tableName: string,
              keys: DDB.Key[],
              cb: Function): void {
    // build a list of delete functions
    const funcs = async.reflectAll(keys.map(key => {
      const params = {
        Key: key,
        TableName: tableName
      };
      return async.apply(this.deleteItem.bind(this), params);
    }));
    // now delete them, one at a time
    async.series(funcs, (err, data) => cb());
  }
github vabatta / omx-manager / src / lib / dbuscontroller.js View on Github external
attach () {
    async.series([
      (cb) => {
        exec('OMXPLAYER_DBUS_ADDR="/tmp/omxplayerdbus.${USER}"', (error) => {
          if (error) {
            cb(error)
          }
        })
      },
      (cb) => {
        exec('OMXPLAYER_DBUS_PID="/tmp/omxplayerdbus.${USER}.pid"', (error) => {
          if (error) {
            cb(error)
          }
        })
      },
      (cb) => {
        exec('export DBUS_SESSION_BUS_ADDRESS=`cat $OMXPLAYER_DBUS_ADDR`', (error) => {

async-es

Higher-order functions and common patterns for asynchronous code

MIT
Latest version published 6 months ago

Package Health Score

77 / 100
Full package analysis