MCPcopy Create free account
hub / github.com/anomalyco/opencode / option

Function option

packages/opencode/test/server/httpapi-exercise/routing.ts:82–86  ·  view source on GitHub ↗
(args: string[], name: string)

Source from the content-addressed store, hash-verified

80}
81
82function option(args: string[], name: string) {
83 const index = args.indexOf(name)
84 if (index === -1) return undefined
85 return args[index + 1]
86}
87
88function parseScenarioTimeout(input: string) {
89 if (!isScenarioTimeout(input)) throw new Error(`invalid --scenario-timeout ${input}`)

Callers 1

parseOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected