MCPcopy Create free account
hub / github.com/arctic-cli/interface / buildKeyMap

Function buildKeyMap

packages/sdk/js/src/gen/core/params.gen.ts:50–69  ·  view source on GitHub ↗
(fields: FieldsConfig, map?: KeyMap)

Source from the content-addressed store, hash-verified

48>
49
50const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => {
51 if (!map) {
52 map = new Map()
53 }
54
55 for (const config of fields) {
56 if ("in" in config) {
57 if (config.key) {
58 map.set(config.key, {
59 in: config.in,
60 map: config.map,
61 })
62 }
63 } else if (config.args) {
64 buildKeyMap(config.args, map)
65 }
66 }
67
68 return map
69}
70
71interface Params {
72 body: unknown

Callers 1

buildClientParamsFunction · 0.70

Calls 1

setMethod · 0.45

Tested by

no test coverage detected