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

Function _stripBasePath

packages/common/src/location/location.ts:310–319  ·  view source on GitHub ↗
(basePath: string, url: string)

Source from the content-addressed store, hash-verified

308}
309
310function _stripBasePath(basePath: string, url: string): string {
311 if (!basePath || !url.startsWith(basePath)) {
312 return url;
313 }
314 const strippedUrl = url.substring(basePath.length);
315 if (strippedUrl === '' || ['/', ';', '?', '#'].includes(strippedUrl[0])) {
316 return strippedUrl;
317 }
318 return url;
319}
320
321function _stripIndexHtml(url: string): string {
322 return url.replace(/\/index\.html$/, '');

Callers 1

normalizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…