title: Is there a way to stop execution of next function of series with async in nodejs?
body: <pre><code>  async.map(list, function(object, callback) {
      async.series([
        function(callback) {
          console.log("1");
  
          var booltest = false;
          // assuming some logic is performed that may or may not change booltest
          if(booltest) {
              // finish this current function, move on to next function in series
          } else {
             // stop here and just die, dont move on to the next function in the series
          }
  
          callback(null, 'one');
        },
        function(callback) {
          console.log("2");
          callback(null, 'two');
        }
      ],
      function(err, done){
      });
    });
  </code></pre>
  
  <p>Is there some way such that if function1 if booltest evaluates to true, don't move on to the next function that outputs "2"?</p>