MCPcopy Create free account
hub / github.com/HKUDS/AgentSpace / copyStringFlagAsParameter

Function copyStringFlagAsParameter

apps/cli/src/commands/integrations/feishu.ts:3340–3350  ·  view source on GitHub ↗
(
  flags: Record<string, string | boolean>,
  parameters: Record<string, unknown>,
  flag: string,
  parameter: string,
)

Source from the content-addressed store, hash-verified

3338}
3339
3340function copyStringFlagAsParameter(
3341 flags: Record<string, string | boolean>,
3342 parameters: Record<string, unknown>,
3343 flag: string,
3344 parameter: string,
3345): void {
3346 const value = normalizeOptionalText(getStringFlag(flags, flag));
3347 if (value) {
3348 parameters[parameter] = value;
3349 }
3350}
3351
3352function copyJsonFlagAsParameter(
3353 flags: Record<string, string | boolean>,

Callers 1

Calls 2

getStringFlagFunction · 0.90
normalizeOptionalTextFunction · 0.70

Tested by

no test coverage detected