MCPcopy Create free account
hub / github.com/error311/FileRise / hasSourceId

Function hasSourceId

public/js/sourceManager.js:28–36  ·  view source on GitHub ↗
(candidate, sources)

Source from the content-addressed store, hash-verified

26}
27
28function hasSourceId(candidate, sources) {
29 const key = String(candidate || '').trim();
30 if (!key) return false;
31 return sources.some(src => {
32 if (!src || typeof src !== 'object') return false;
33 const id = String(src.id || src.key || src.name || '').trim();
34 return id === key;
35 });
36}
37
38function pickActiveId(sourcesCfg, sources) {
39 try {

Callers 1

pickActiveIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected