MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / touchCell

Function touchCell

ses.cjs:1268–1278  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

1266 const head= makeSelfCell(undefined);
1267
1268 const touchCell= (key)=>{
1269 const cell= keyToCell.get(key);
1270 if( cell=== undefined|| cell.data=== undefined) {
1271 // Either the key was GCed, or the cell was condemned.
1272 return undefined;
1273 }
1274 // Becomes most recently used
1275 spliceOut(cell);
1276 spliceAfter(head, cell);
1277 return cell;
1278 };
1279
1280 /**
1281 * @param {K} key

Callers 3

hasFunction · 0.85
getFunction · 0.85
setFunction · 0.85

Calls 3

spliceOutFunction · 0.85
spliceAfterFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected