MCPcopy Create free account
hub / github.com/socketstream/socketstream / pushUniqueAsset

Function pushUniqueAsset

lib/client/system/index.js:21–29  ·  view source on GitHub ↗
(listName,asset)

Source from the content-addressed store, hash-verified

19};
20
21function pushUniqueAsset(listName,asset) {
22 var list = assets[listName],i;
23 for(i=list.length-1; i>=0; --i) {
24 if (list[i].name === asset.name) {
25 list.splice(i,1);
26 }
27 }
28 return list.push(asset);
29}
30
31/**
32 * @ngdoc function

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected