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

Function addCandidate

apps/json-format/json-auto-utils.js:400–405  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

398 const candidates = [];
399 const seen = new Set();
400 const addCandidate = (value) => {
401 value = String(value || '').trim();
402 if (!value || seen.has(value)) return;
403 seen.add(value);
404 candidates.push(value);
405 };
406
407 const normalized = String(source || '').trim();
408 const stripped = stripJSONGuards(normalized);

Callers 1

buildJSONLikeCandidatesFunction · 0.70

Calls 2

hasMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected