async-lite.js
function(tasks, callback) {

      if (!isArray(tasks)) return callback();

      var length = tasks.length;
      var results = [];

      function runTask(index) {
        tasks[index](function(err, result) {
          if (err) return callback(err);
          results[index] = result;
          if (index < length - 1) return runTask(index + 1);
          return callback(null, results);
        });
      }

      runTask(0);
    }
function(tasks, callback) {

      if (!isArray(tasks)) return callback();

      var length = tasks.length;
      var results = [];

      function runTask(index) {
        tasks[index](function(err, result) {
          if (err) return callback(err);
          results[index] = result;
          if (index < length - 1) return runTask(index + 1);
          return callback(null, results);
        });
      }

      runTask(0);
    }
function ( tasks , callback ) { if ( ! isArray ( tasks ) ) return callback ( ) ; var length = tasks . length ; var results = [ ] ; function runTask ( index ) { tasks [ index ] ( function ( err , result ) { if ( err ) return callback ( err ) ; results [ index ] = result ; if ( index < length - 1 ) return runTask ( index + 1 ) ; return callback ( null , results ) ; } ) ; } runTask ( 0 ) ; }
only accepts an array since the preservation of the order of properties on an object can't be guaranteed returns an array of results in order
only accepts an array since the preservation of the order of properties on an object can t be guaranteed returns an array of results in order