MCPcopy Index your code
hub / github.com/dataease/SQLBot / buildNestedParams

Function buildNestedParams

frontend/public/swagger-ui-bundle.js:41613–41625  ·  view source on GitHub ↗
(s, o, i)

Source from the content-addressed store, hash-verified

41611 }
41612 function encodeFormOrQuery(s) {
41613 return ((s, { encode: o = !0 } = {}) => {
41614 const buildNestedParams = (s, o, i) => (
41615 Array.isArray(i)
41616 ? i.reduce((i, a) => buildNestedParams(s, o, a), s)
41617 : i instanceof Date
41618 ? s.append(o, i.toISOString())
41619 : 'object' == typeof i
41620 ? Object.entries(i).reduce(
41621 (i, [a, u]) => buildNestedParams(s, `${o}[${a}]`, u),
41622 s
41623 )
41624 : s.append(o, i),
41625 s
41626 ),
41627 i = Object.entries(s).reduce(
41628 (s, [o, i]) => buildNestedParams(s, o, i),

Callers 1

encodeFormOrQueryFunction · 0.85

Calls 3

isArrayMethod · 0.45
reduceMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected