_composeHandlers(...funcs) {
    // If handler is not a function, mock it
    funcs = funcs.map(func => async (...args) => {
      if (typeof func === "function") {
        await func(...args);
      }
    });

    return funcs.reduce((a, b) => async (...args) => {
      await a(...args);
      await b(...args);
    });
  }
// Composes handler methods for previous middleware into single one
Composes handler methods for previous middleware into single one
Composes handler methods for previous middleware into single one
_composeHandlers(...funcs) {
    funcs = funcs.map(func => async (...args) => {
      if (typeof func === "function") {
        await func(...args);
      }
    });
    return funcs.reduce((a, b) => async (...args) => {
      await a(...args);
      await b(...args);
    });
  }
_composeHandlers ( ... funcs ) { funcs = funcs . map ( func => async ( ... args ) => { if ( typeof func === "function" ) { await func ( ... args ) ; } } ) ; return funcs . reduce ( ( a , b ) => async ( ... args ) => { await a ( ... args ) ; await b ( ... args ) ; } ) ; }
Composes handler methods for previous middleware into single one
Composes handler methods for previous middleware into single one
// If handler is not a function, mock it