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

Function equalSegments

packages/router/src/url_tree.ts:406–408  ·  view source on GitHub ↗
(as: UrlSegment[], bs: UrlSegment[])

Source from the content-addressed store, hash-verified

404}
405
406export function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {
407 return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));
408}
409
410export function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {
411 if (as.length !== bs.length) return false;

Callers 2

compareSegmentsFunction · 0.90

Calls 2

shallowEqualFunction · 0.90
equalPathFunction · 0.85

Tested by 1

compareSegmentsFunction · 0.72