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

Function stripJSONGuards

apps/json-format/json-auto-utils.js:335–342  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

333 }
334
335 function stripJSONGuards(source) {
336 source = String(source || '').trim().replace(/^\uFEFF/, '');
337 source = source
338 .replace(/^\)\]\}',?\s*/, '')
339 .replace(/^while\s*\(\s*1\s*\)\s*;\s*/, '')
340 .replace(/^for\s*\(\s*;\s*;\s*\)\s*;\s*/, '');
341 return source.trim();
342 }
343
344 function extractBalancedJSONContainer(source) {
345 source = String(source || '');

Callers 1

buildJSONLikeCandidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected