docs: function getHistoryPath(rootURL, location) {
      var path = _emberRoutingLocationUtil.getPath(location);
      var hash = _emberRoutingLocationUtil.getHash(location);
      var query = _emberRoutingLocationUtil.getQuery(location);
      var rootURLIndex = path.indexOf(rootURL);
      var routeHash, hashParts;
  
      _emberMetalDebug.assert('Path ' + path + ' does not start with the provided rootURL ' + rootURL, rootURLIndex === 0);
  
      // By convention, Ember.js routes using HashLocation are required to start
      // with `#/`. Anything else should NOT be considered a route and should
      // be passed straight through, without transformation.
      if (hash.substr(0, 2) === '#/') {
        // There could be extra hash segments after the route
        hashParts = hash.substr(1).split('#');
        // The first one is always the route url
        routeHash = hashParts.shift();
  
        // If the path already has a trailing slash, remove the one
        // from the hashed route so we don't double up.
        if (path.slice(-1) === '/') {
          routeHash = routeHash.substr(1);
        }
  
        // This is the "expected" final order
        path = path + routeHash + query;
  
        if (hashParts.length) {
          path += '#' + hashParts.join('#');
        }
      } else {
        path = path + query + hash;
      }
  
      return path;
    }