MCPcopy
hub / github.com/tighten/ziggy / _currentUrl

Method _currentUrl

src/js/Router.js:96–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 }
95
96 _currentUrl() {
97 const { host, pathname, search } = this._location();
98
99 return (
100 (this._config.absolute
101 ? host + pathname
102 : pathname
103 .replace(this._config.url.replace(/^\w*:\/\/[^/]+/, ''), '')
104 .replace(/^\/+/, '/')) + search
105 );
106 }
107
108 /**
109 * Get the name of the route matching the current window URL, or, given a route name

Callers 1

_unresolveMethod · 0.95

Calls 1

_locationMethod · 0.95

Tested by

no test coverage detected