lib/bulk.js
// TODO: This implementation is a bit whacky recursive implementation. PR anyone?
This implementation is a bit whacky recursive implementation.
This implementation is a bit whacky recursive implementation .
function each(cmds, executeCmd, idx) {
  idx = idx || 0;
  if (idx < cmds.length) {
    return executeCmd(cmds[idx]).then(() => each(cmds, executeCmd, idx + 1));
  }
  return Promise.resolve();
}
function each ( cmds , executeCmd , idx ) { idx = idx || 0 ; if ( idx < cmds . length ) { return executeCmd ( cmds [ idx ] ) . then ( ( ) => each ( cmds , executeCmd , idx + 1 ) ) ; } return Promise . resolve ( ) ; }
TODO: This implementation is a bit whacky recursive implementation.
TODO : This implementation is a bit whacky recursive implementation .