MCPcopy Index your code
hub / github.com/anomalyco/opencode / num

Function num

packages/opencode/src/cli/cmd/run/tool.ts:159–165  ·  view source on GitHub ↗
(v: unknown)

Source from the content-addressed store, hash-verified

157}
158
159function num(v: unknown): number | undefined {
160 if (typeof v !== "number" || !Number.isFinite(v)) {
161 return undefined
162 }
163
164 return v
165}
166
167function list<T>(v: unknown): T[] {
168 if (!Array.isArray(v)) {

Callers 2

spanFunction · 0.70
scrollBashFinalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected