MCPcopy Create free account
hub / github.com/FeatureProbe/FeatureProbe / isJSON

Function isJSON

ui/src/utils/tools.ts:16–24  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

14};
15
16export const isJSON = (str: string) => {
17 try {
18 if (JSON.parse(str) instanceof Object) {
19 return true;
20 }
21 } catch (error) {
22 return false;
23 }
24};
25
26export const getVariationName = (variations: IVariation[]) => {
27 let name = '';

Callers 1

VariationItemFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected