docs: function ensure_valid_routes(raw_routes) {
      !Array.isArray(raw_routes)
          ? throw_type_error('routes must be an array')
          : 0 === raw_routes.length
              && throw_error('There are no routes defined')
          ; // eslint-disable-line indent
      const routes = [];
      for (let i = 0, n = raw_routes.length - 1; i <= n; i++) {
          const raw_route = raw_routes[i];
          raw_route.path
              ? raw_route.pattern || raw_route.pattern_tokens
                  ? throw_error(
                      'If route.path is defined,',
                      'route.pattern and route.pattern_tokens are invalid',
                      ) // eslint-disable-line indent
                  : 'string' !== typeof raw_route.path
                      && throw_type_error('route.path must be a string')
              : raw_route.pattern
                  ? !(raw_route.pattern instanceof RegExp)
                      && throw_type_error(
                          'route.pattern must be a regular expression',
                          ) // eslint-disable-line indent
                  : throw_type_error(
                      'route.path must be a string',
                      'or route.pattern must be regular expression',
                      ) // eslint-disable-line indent
              ; // eslint-disable-line indent
          raw_route.redirect_to
              ? 'string' !== typeof raw_route.redirect_to
                  ? throw_type_error('route.redirect_to must be a string')
                  : raw_route.component
                      && throw_error(
                          'If route.redirect_to is defined,',
                          'route.component is invalid',
                          ) // eslint-disable-line indent
              : !(raw_route.component.prototype instanceof REACT.Component)
                  && throw_type_error('route.component must be a React Component')
              ; // eslint-disable-line indent
          routes.push({
              path: raw_route.path ? ensure_valid_path(raw_route.path) : null,
              pattern: raw_route.pattern || null,
              pattern_tokens:
                  ensure_valid_pattern_tokens(raw_route.pattern_tokens)
                  , // eslint-disable-line
              redirect_to: raw_route.redirect_to || null,
              component: raw_route.component,
              }); // eslint-disable-line indent
      }
      return routes;
  }