MCPcopy Index your code
hub / github.com/angular/angular / normalize

Method normalize

packages/common/src/location/location.ts:134–136  ·  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

132 * @returns The normalized URL string.
133 */
134 normalize(url: string): string {
135 return Location.stripTrailingSlash(_stripBasePath(this._basePath, _stripIndexHtml(url)));
136 }
137
138 /**
139 * 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