index.js
function(index)
  {
    //Check the index value
    if(index >= nutty._middlewares.length){ return; }

    //Call the middleware
    nutty._middlewares[index](args, function(error)
    {
      //Check for undefined error
      if(typeof error === 'undefined'){ var error = null; }

      //Check for error
      if(error && error instanceof Error)
      {
        //Throw the error
        throw error;
      }

      //Next middleware on the list
      return middlewares_recursive(index + 1);
    });
  }
function(index)
  {
    //Check the index value
    if(index >= nutty._middlewares.length){ return; }

    //Call the middleware
    nutty._middlewares[index](args, function(error)
    {
      //Check for undefined error
      if(typeof error === 'undefined'){ var error = null; }

      //Check for error
      if(error && error instanceof Error)
      {
        //Throw the error
        throw error;
      }

      //Next middleware on the list
      return middlewares_recursive(index + 1);
    });
  }
function ( index ) { //Check the index value if ( index >= nutty . _middlewares . length ) { return ; } //Call the middleware nutty . _middlewares [ index ] ( args , function ( error ) { //Check for undefined error if ( typeof error === 'undefined' ) { var error = null ; } //Check for error if ( error && error instanceof Error ) { //Throw the error throw error ; } //Next middleware on the list return middlewares_recursive ( index + 1 ) ; } ) ; }
Middlewares recursive caller
Middlewares recursive caller