lib/util/util.js
function stopSeries(err) {
      if(err instanceof Error || (typeof err === 'object' && (err.code || err.error))) {
        stopErr = err;
      }
      isStopped = true;
    }
function stopSeries(err) {
      if(err instanceof Error || (typeof err === 'object' && (err.code || err.error))) {
        stopErr = err;
      }
      isStopped = true;
    }
function stopSeries ( err ) { if ( err instanceof Error || ( typeof err === 'object' && ( err . code || err . error ) ) ) { stopErr = err ; } isStopped = true ; }
The function can be called inside a promise call, that will stop the series chain.
The function can be called inside a promise call that will stop the series chain .