MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / addToRing

Function addToRing

lib/web/kill.js:5–8  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

3var killRing = [];
4
5function addToRing(str) {
6 killRing.push(str);
7 if (killRing.length > 50) killRing.shift();
8}
9
10function growRingTop(str) {
11 if (!killRing.length) return addToRing(str);

Callers 4

growRingTopFunction · 0.70
killFunction · 0.70
copyFunction · 0.70
pasteFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected