src/descriptors.js
function Route(props) {
  props = props ? merge({}, props) : {};

  var path = props.path;

  if (typeof path === 'string') {
    path = path.replace(slashes, '');
  }

  delete props.path;

  var view = props.view;
  delete props.view;

  var viewPromise = props.viewPromise;
  delete props.viewPromise;

  var name = props.name;
  delete props.name;

  var __scope = props.__scope;
  delete props.__scope;

  var args = Array.prototype.slice.call(arguments, 1);

  var children = [];

  // so we support passing routes as arguments and arrays
  for (var i = 0, len = args.length; i < len; i++) {
    if (Array.isArray(args[i])) {
      children = children.concat(args[i]);
    } else {
      children.push(args[i]);
    }
  }

  var route = {path, name, view, viewPromise, props, children, __scope};
  buildNameIndex(route);
  return route;
}
function Route(props) {
  props = props ? merge({}, props) : {};

  var path = props.path;

  if (typeof path === 'string') {
    path = path.replace(slashes, '');
  }

  delete props.path;

  var view = props.view;
  delete props.view;

  var viewPromise = props.viewPromise;
  delete props.viewPromise;

  var name = props.name;
  delete props.name;

  var __scope = props.__scope;
  delete props.__scope;

  var args = Array.prototype.slice.call(arguments, 1);

  var children = [];

  // so we support passing routes as arguments and arrays
  for (var i = 0, len = args.length; i < len; i++) {
    if (Array.isArray(args[i])) {
      children = children.concat(args[i]);
    } else {
      children.push(args[i]);
    }
  }

  var route = {path, name, view, viewPromise, props, children, __scope};
  buildNameIndex(route);
  return route;
}
function Route ( props ) { props = props ? merge ( { } , props ) : { } ; var path = props . path ; if ( typeof path === 'string' ) { path = path . replace ( slashes , '' ) ; } delete props . path ; var view = props . view ; delete props . view ; var viewPromise = props . viewPromise ; delete props . viewPromise ; var name = props . name ; delete props . name ; var __scope = props . __scope ; delete props . __scope ; var args = Array . prototype . slice . call ( arguments , 1 ) ; var children = [ ] ; // so we support passing routes as arguments and arrays for ( var i = 0 , len = args . length ; i < len ; i ++ ) { if ( Array . isArray ( args [ i ] ) ) { children = children . concat ( args [ i ] ) ; } else { children . push ( args [ i ] ) ; } } var route = { path , name , view , viewPromise , props , children , __scope } ; buildNameIndex ( route ) ; return route ; }
Route desriptor constructor

@param {Object} props
@param {Object...} children
@returns {Route}
Route desriptor constructor