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

Function equalSegmentGroups

packages/router/src/url_tree.ts:175–191  ·  view source on GitHub ↗
(
  container: UrlSegmentGroup,
  containee: UrlSegmentGroup,
  matrixParams: ParamMatchOptions,
)

Source from the content-addressed store, hash-verified

173}
174
175function equalSegmentGroups(
176 container: UrlSegmentGroup,
177 containee: UrlSegmentGroup,
178 matrixParams: ParamMatchOptions,
179): boolean {
180 if (!equalPath(container.segments, containee.segments)) return false;
181 if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {
182 return false;
183 }
184 if (container.numberOfChildren !== containee.numberOfChildren) return false;
185 for (const c in containee.children) {
186 if (!container.children[c]) return false;
187 if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams))
188 return false;
189 }
190 return true;
191}
192
193function containsParams(container: Params, containee: Params): boolean {
194 return (

Callers

nothing calls this directly

Calls 2

equalPathFunction · 0.85
matrixParamsMatchFunction · 0.85

Tested by

no test coverage detected