MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / push

Method push

daemon/src/common/string_cache.ts:38–49  ·  view source on GitHub ↗
(item: T)

Source from the content-addressed store, hash-verified

36 }
37
38 push(item: T): void {
39 if (this.size === this.capacity) {
40 this.buffer[this.tail] = item;
41 this.head = (this.head + 1) % this.capacity;
42 this.tail = (this.tail + 1) % this.capacity;
43 this.deleted = true;
44 } else {
45 this.buffer[this.tail] = item;
46 this.tail = (this.tail + 1) % this.capacity;
47 this.size++;
48 }
49 }
50
51 getCache() {
52 const result: T[] = [];

Callers 3

pushLogMethod · 0.95
useZipFunction · 0.45
getCacheMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected