MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / parseKeyValue

Function parseKeyValue

src/commands/mcp.ts:44–48  ·  view source on GitHub ↗

Parse a KEY=value pair from a flag argument.

(arg: string)

Source from the content-addressed store, hash-verified

42
43/** Parse a KEY=value pair from a flag argument. */
44function parseKeyValue(arg: string): [string, string] {
45 const idx = arg.indexOf("=")
46 if (idx === -1) throw new Error(`Expected KEY=value, got "${arg}"`)
47 return [arg.slice(0, idx), arg.slice(idx + 1)]
48}
49
50/** Print usage and exit. */
51function printMcpHelp(): void {

Callers 1

parseAddFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected