MCPcopy Create free account
hub / github.com/Pythagora-io/pythagora / parseString

Function parseString

src/utils/common.js:54–66  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

52}
53
54function parseString(s) {
55 if (typeof s === 'string') {
56 try {
57 let tempS = JSON.parse(s);
58 if (typeof tempS === 'object' || typeof tempS === 'boolean') {
59 s = tempS;
60 }
61 } catch (e) {
62 //dummy catch
63 }
64 }
65 return s
66}
67
68function compareResponse(a, b) {
69 a = parseString(a);

Callers 1

compareResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected