docs: function detectImplementation(options) {
      var location = options.location;
      var userAgent = options.userAgent;
      var history = options.history;
      var documentMode = options.documentMode;
      var global = options.global;
      var rootURL = options.rootURL;
  
      var implementation = 'none';
      var cancelRouterSetup = false;
      var currentPath = _emberRoutingLocationUtil.getFullPath(location);
  
      if (_emberRoutingLocationUtil.supportsHistory(userAgent, history)) {
        var historyPath = getHistoryPath(rootURL, location);
  
        // If the browser supports history and we have a history path, we can use
        // the history location with no redirects.
        if (currentPath === historyPath) {
          return 'history';
        } else {
          if (currentPath.substr(0, 2) === '/#') {
            history.replaceState({ path: historyPath }, null, historyPath);
            implementation = 'history';
          } else {
            cancelRouterSetup = true;
            _emberRoutingLocationUtil.replacePath(location, historyPath);
          }
        }
      } else if (_emberRoutingLocationUtil.supportsHashChange(documentMode, global)) {
        var hashPath = getHashPath(rootURL, location);
  
        // Be sure we're using a hashed path, otherwise let's switch over it to so
        // we start off clean and consistent. We'll count an index path with no
        // hash as "good enough" as well.
        if (currentPath === hashPath || currentPath === '/' && hashPath === '/#/') {
          implementation = 'hash';
        } else {
          // Our URL isn't in the expected hash-supported format, so we want to
          // cancel the router setup and replace the URL to start off clean
          cancelRouterSetup = true;
          _emberRoutingLocationUtil.replacePath(location, hashPath);
        }
      }
  
      if (cancelRouterSetup) {
        return false;
      }
  
      return implementation;
    }