MCPcopy
hub / github.com/angular/angular / parseParam

Method parseParam

packages/router/src/url_tree.ts:711–727  ·  view source on GitHub ↗
(params: {[key: string]: string})

Source from the content-addressed store, hash-verified

709 }
710
711 private parseParam(params: {[key: string]: string}): void {
712 const key = matchMatrixKeySegments(this.remaining);
713 if (!key) {
714 return;
715 }
716 this.capture(key);
717 let value: any = '';
718 if (this.consumeOptional('=')) {
719 const valueMatch = matchSegments(this.remaining);
720 if (valueMatch) {
721 value = valueMatch;
722 this.capture(value);
723 }
724 }
725
726 params[decode(key)] = decode(value);
727 }
728
729 // Parse a single query parameter `name[=value]`
730 private parseQueryParam(params: Params): void {

Callers 1

parseMatrixParamsMethod · 0.95

Calls 5

captureMethod · 0.95
consumeOptionalMethod · 0.95
matchMatrixKeySegmentsFunction · 0.85
matchSegmentsFunction · 0.85
decodeFunction · 0.70

Tested by

no test coverage detected