MCPcopy Index your code
hub / github.com/cifertech/DisplayKit / removeUnusedAssets

Function removeUnusedAssets

app.js:3383–3393  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3381}
3382
3383function removeUnusedAssets() {
3384 const used = new Set();
3385 (screens || []).forEach((scr) => (scr.elements || []).forEach((el) => { if (el && el.assetId) used.add(el.assetId); }));
3386 const before = (assets || []).length;
3387 assets = (assets || []).filter((a) => a && used.has(a.id));
3388 const after = (assets || []).length;
3389 if (before !== after) {
3390 renderAssets();
3391 pushHistory();
3392 }
3393}
3394
3395
3396function convertToOLEDColor(color) {

Callers 1

app.jsFile · 0.85

Calls 2

renderAssetsFunction · 0.85
pushHistoryFunction · 0.85

Tested by

no test coverage detected