MCPcopy Index your code
hub / github.com/angular/angular / serializeQueryParams

Function serializeQueryParams

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

Source from the content-addressed store, hash-verified

570}
571
572function serializeQueryParams(params: {[key: string]: any}): string {
573 const strParams: string[] = Object.entries(params)
574 .map(([name, value]) => {
575 return Array.isArray(value)
576 ? value.map((v) => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&')
577 : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;
578 })
579 .filter((s) => s);
580
581 return strParams.length ? `?${strParams.join('&')}` : '';
582}
583
584const SEGMENT_RE = /^[^\/()?;#]+/;
585function matchSegments(str: string): string {

Callers 1

serializeMethod · 0.85

Calls 6

mapMethod · 0.80
isArrayMethod · 0.80
encodeUriQueryFunction · 0.70
joinMethod · 0.65
filterMethod · 0.45
entriesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…