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

Function buildKeyMap

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

Source from the content-addressed store, hash-verified

63>
64
65const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => {
66 if (!map) {
67 map = new Map()
68 }
69
70 for (const config of fields) {
71 if ("in" in config) {
72 if (config.key) {
73 map.set(config.key, {
74 in: config.in,
75 map: config.map,
76 })
77 }
78 } else if ("key" in config) {
79 map.set(config.key, {
80 map: config.map,
81 })
82 } else if (config.args) {
83 buildKeyMap(config.args, map)
84 }
85 }
86
87 return map
88}
89
90interface Params {
91 body: unknown

Callers 1

buildClientParamsFunction · 0.70

Calls 1

setMethod · 0.45

Tested by

no test coverage detected