code: function createRoutes(routes) {
    if (isReactChildren(routes)) {
      routes = createRoutesFromReactChildren(routes);
    } else if (routes && !Array.isArray(routes)) {
      routes = [routes];
    }
  
    return routes;
  }
docs: Creates and returns an array of routes from the given object which
  may be a JSX route, a plain object route, or an array of either.