lib/router.js
function getHandlersFromArgs(args, start) {
  assert.ok(args);

  args = Array.prototype.slice.call(args, start);

  function process(handlers, acc) {
    if (handlers.length === 0) {
      return acc;
    }

    var head = handlers.shift();
    if (Array.isArray(head)) {
      return process(head.concat(handlers), acc);
    } else {
      assert.func(head, 'handler');
      acc.push(head);
      return process(handlers, acc);
    }
  }

  return process(args, []);
}
function getHandlersFromArgs(args, start) {
  assert.ok(args);

  args = Array.prototype.slice.call(args, start);

  function process(handlers, acc) {
    if (handlers.length === 0) {
      return acc;
    }

    var head = handlers.shift();
    if (Array.isArray(head)) {
      return process(head.concat(handlers), acc);
    } else {
      assert.func(head, 'handler');
      acc.push(head);
      return process(handlers, acc);
    }
  }

  return process(args, []);
}
function getHandlersFromArgs ( args , start ) { assert . ok ( args ) ; args = Array . prototype . slice . call ( args , start ) ; function process ( handlers , acc ) { if ( handlers . length === 0 ) { return acc ; } var head = handlers . shift ( ) ; if ( Array . isArray ( head ) ) { return process ( head . concat ( handlers ) , acc ) ; } else { assert . func ( head , 'handler' ) ; acc . push ( head ) ; return process ( handlers , acc ) ; } } return process ( args , [ ] ) ; }
Given a argument list, flatten the list
@param args
@param start point from which to slice the list
@returns {Array}
Given a argument list flatten the list