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

Function matchSegments

packages/router/src/url_tree.ts:665–668  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

663
664const SEGMENT_RE = /^[^\/()?;#]+/;
665function matchSegments(str: string): string {
666 const match = str.match(SEGMENT_RE);
667 return match ? match[0] : '';
668}
669
670const MATRIX_PARAM_SEGMENT_RE = /^[^\/()?;=#]+/;
671function matchMatrixKeySegments(str: string): string {

Callers 3

parseSegmentMethod · 0.85
parseParamMethod · 0.85
parseParensMethod · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected