MCPcopy Create free account
hub / github.com/middleapi/orpc / flattenParams

Function flattenParams

packages/nest/src/implement.ts:188–201  ·  view source on GitHub ↗
(params: NestParams | undefined)

Source from the content-addressed store, hash-verified

186}
187
188function flattenParams(params: NestParams | undefined): StandardParams {
189 const flatten: StandardParams = {}
190
191 for (const [key, value] of Object.entries(params ?? {})) {
192 if (Array.isArray(value)) {
193 flatten[key] = value.join('/')
194 }
195 else {
196 flatten[key] = value
197 }
198 }
199
200 return flatten
201}

Callers 1

interceptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected