MCPcopy Index your code
hub / github.com/angular/angular-cli / addTrailingSlash

Function addTrailingSlash

packages/angular/ssr/src/utils/url.ts:76–79  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

74 * ```
75 */
76export function addTrailingSlash(url: string): string {
77 // Check if the URL already end with a slash
78 return url.at(-1) === '/' ? url : `${url}/`;
79}
80
81/**
82 * Joins URL parts into a single URL string.

Callers 3

url_spec.tsFile · 0.90
constructSerializedUrlFunction · 0.90
traverseRoutesConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected