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

Function num

packages/opencode/src/session/retry.ts:159–163  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

157}
158
159function num(value: unknown) {
160 const parsed = Number.parseFloat(str(value))
161 if (Number.isNaN(parsed)) return undefined
162 return parsed
163}
164
165function parseJSON(value: unknown) {
166 return iife(() => {

Callers 1

retryableFunction · 0.70

Calls 1

strFunction · 0.85

Tested by

no test coverage detected