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

Function getSourceNameById

public/js/fileListView.js:1606–1620  ·  view source on GitHub ↗
(sourceId)

Source from the content-addressed store, hash-verified

1604}
1605
1606function getSourceNameById(sourceId) {
1607 const id = String(sourceId || '').trim();
1608 if (!id) return '';
1609 try {
1610 if (typeof window.__frGetSourceNameById === 'function') {
1611 return String(window.__frGetSourceNameById(id) || '');
1612 }
1613 } catch (e) { /* ignore */ }
1614 const sel = document.getElementById('sourceSelector');
1615 if (sel) {
1616 const opt = Array.from(sel.options).find(o => o.value === id);
1617 if (opt) return String(opt.dataset?.sourceName || '');
1618 }
1619 return '';
1620}
1621
1622function getSourceTypeById(sourceId) {
1623 const id = String(sourceId || '').trim();

Callers 3

getSourceMetaByIdFunction · 0.70
getRootLabelFunction · 0.70
getRootCrumbLabelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected