MCPcopy Create free account
hub / github.com/angular/angular / normalize

Method normalize

packages/common/src/location/location.ts:140–142  ·  view source on GitHub ↗

* Normalizes a URL path by stripping any trailing slashes. * * @param url String representing a URL. * * @returns The normalized URL string.

(url: string)

Source from the content-addressed store, hash-verified

138 * @returns The normalized URL string.
139 */
140 normalize(url: string): string {
141 return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));
142 }
143
144 /**
145 * Normalizes an external URL path.

Callers 2

pathMethod · 0.95
isCurrentPathEqualToMethod · 0.95

Implementers 1

SpyLocationpackages/common/testing/src/location_m

Calls 2

_stripBasePathFunction · 0.85
_stripIndexHtmlFunction · 0.70

Tested by

no test coverage detected