MCPcopy
hub / github.com/angular/angular / equalSegments

Function equalSegments

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

Source from the content-addressed store, hash-verified

379}
380
381export function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {
382 return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));
383}
384
385export function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {
386 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…