MCPcopy
hub / github.com/stepci/stepci / isJSON

Function isJSON

src/lib/utils.ts:21–29  ·  view source on GitHub ↗
(input: string | object)

Source from the content-addressed store, hash-verified

19}
20
21export function isJSON (input: string | object) {
22 if (typeof input === 'object') return true
23 try {
24 JSON.parse(input as string)
25 return true
26 } catch (e) {
27 return false
28 }
29}

Callers 1

renderStepCheckFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected