benchmarks/scenarios/ember.js
function () {
      var location = _emberMetalProperty_get.get(this, 'location');
      var path = location.pathname;

      var rootURL = _emberMetalProperty_get.get(this, 'rootURL');
      var baseURL = _emberMetalProperty_get.get(this, 'baseURL');

      // remove trailing slashes if they exists
      rootURL = rootURL.replace(/\/$/, '');
      baseURL = baseURL.replace(/\/$/, '');

      // remove baseURL and rootURL from path
      var url = path.replace(baseURL, '').replace(rootURL, '');

      var search = location.search || '';
      url += search;
      url += this.getHash();

      return url;
    }
function () {
      var location = _emberMetalProperty_get.get(this, 'location');
      var path = location.pathname;

      var rootURL = _emberMetalProperty_get.get(this, 'rootURL');
      var baseURL = _emberMetalProperty_get.get(this, 'baseURL');

      // remove trailing slashes if they exists
      rootURL = rootURL.replace(/\/$/, '');
      baseURL = baseURL.replace(/\/$/, '');

      // remove baseURL and rootURL from path
      var url = path.replace(baseURL, '').replace(rootURL, '');

      var search = location.search || '';
      url += search;
      url += this.getHash();

      return url;
    }
function ( ) { var location = _emberMetalProperty_get . get ( this , 'location' ) ; var path = location . pathname ; var rootURL = _emberMetalProperty_get . get ( this , 'rootURL' ) ; var baseURL = _emberMetalProperty_get . get ( this , 'baseURL' ) ; // remove trailing slashes if they exists rootURL = rootURL . replace ( / \/$ / , '' ) ; baseURL = baseURL . replace ( / \/$ / , '' ) ; // remove baseURL and rootURL from path var url = path . replace ( baseURL , '' ) . replace ( rootURL , '' ) ; var search = location . search || '' ; url += search ; url += this . getHash ( ) ; return url ; }
Returns the current `location.pathname` without `rootURL` or `baseURL`
@private
@method getURL
@return url {String}
Returns the current location . pathname without rootURL or baseURL