MCPcopy Create free account
hub / github.com/zxlie/FeHelper / unpackTopLevelEscapedJSON

Function unpackTopLevelEscapedJSON

apps/json-format/json-utils.js:273–284  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

271}
272
273export function unpackTopLevelEscapedJSON(value) {
274 if (typeof value !== 'string' || !value.trim()) return value;
275
276 try {
277 const parsed = parseWithBigInt(value);
278 if (_isDeepParsable(parsed)) {
279 return deepParseJSONStrings(parsed);
280 }
281 } catch (_) {}
282
283 return value;
284}
285
286function _isDeepParsable(parsed) {
287 if (typeof parsed !== 'object' || parsed === null) return false;

Callers

nothing calls this directly

Calls 3

_isDeepParsableFunction · 0.85
parseWithBigIntFunction · 0.70
deepParseJSONStringsFunction · 0.70

Tested by

no test coverage detected