lib/director/router.js
function _asyncEverySeries (arr, iterator, callback) {
  if (!arr.length) {
    return callback();
  }

  var completed = 0;
  (function iterate() {
    iterator(arr[completed], function (err) {
      if (err || err === false) {
        callback(err);
        callback = function () {};
      }
      else {
        completed += 1;
        if (completed === arr.length) {
          callback();
        }
        else {
          iterate();
        }
      }
    });
  })();
}
function _asyncEverySeries (arr, iterator, callback) {
  if (!arr.length) {
    return callback();
  }

  var completed = 0;
  (function iterate() {
    iterator(arr[completed], function (err) {
      if (err || err === false) {
        callback(err);
        callback = function () {};
      }
      else {
        completed += 1;
        if (completed === arr.length) {
          callback();
        }
        else {
          iterate();
        }
      }
    });
  })();
}
function _asyncEverySeries ( arr , iterator , callback ) { if ( ! arr . length ) { return callback ( ) ; } var completed = 0 ; ( function iterate ( ) { iterator ( arr [ completed ] , function ( err ) { if ( err || err === false ) { callback ( err ) ; callback = function ( ) { } ; } else { completed += 1 ; if ( completed === arr . length ) { callback ( ) ; } else { iterate ( ) ; } } } ) ; } ) ( ) ; }
Helper function for performing an asynchronous every in series in the browser and the server.
Helper function for performing an asynchronous every in series in the browser and the server .