MCPcopy Index your code
hub / github.com/cameri/nostream / parseTypedValue

Function parseTypedValue

src/cli/utils/config.ts:113–124  ·  view source on GitHub ↗
(raw: string, type: 'inferred' | 'json' = 'inferred')

Source from the content-addressed store, hash-verified

111}
112
113export const parseTypedValue = (raw: string, type: 'inferred' | 'json' = 'inferred'): unknown => {
114 if (type === 'json') {
115 try {
116 return JSON.parse(raw)
117 } catch (error) {
118 const message = error instanceof Error ? error.message : String(error)
119 throw new Error(`Invalid JSON value: ${message}`)
120 }
121 }
122
123 return parseValue(raw)
124}
125
126const toSerializable = (value: unknown): unknown => {
127 if (typeof value === 'bigint') {

Callers 2

config.spec.tsFile · 0.90
runConfigSetFunction · 0.90

Calls 1

parseValueFunction · 0.85

Tested by

no test coverage detected