MCPcopy
hub / github.com/alibaba/lowcode-engine / serializeParams

Function serializeParams

packages/renderer-core/src/utils/common.ts:357–370  ·  view source on GitHub ↗
(obj: any)

Source from the content-addressed store, hash-verified

355 * @returns string
356 */
357export function serializeParams(obj: any) {
358 let result: any = [];
359 forEach(obj, (val: any, key: any) => {
360 if (val === null || val === undefined || val === '') {
361 return;
362 }
363 if (typeof val === 'object') {
364 result.push(`${key}=${encodeURIComponent(JSON.stringify(val))}`);
365 } else {
366 result.push(`${key}=${encodeURIComponent(val)}`);
367 }
368 });
369 return result.join('&');
370}

Callers 3

common.test.tsFile · 0.90
buildUrlFunction · 0.85
postFunction · 0.85

Calls 2

forEachFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…