MCPcopy
hub / github.com/nukeop/nuclear / push

Method push

packages/player/src/utils/RingBuffer.ts:8–16  ·  view source on GitHub ↗
(item: T)

Source from the content-addressed store, hash-verified

6 constructor(private readonly capacity: number) {}
7
8 push(item: T): void {
9 if (this.count < this.capacity) {
10 this.buffer.push(item);
11 this.count++;
12 } else {
13 this.buffer[this.head] = item;
14 this.head = (this.head + 1) % this.capacity;
15 }
16 }
17
18 clear(): void {
19 this.buffer = [];

Callers 15

prependMethod · 0.95
drawFunction · 0.80
setupAudioContextMockFunction · 0.80
Stereo.test.tsxFile · 0.80
Volume.test.tsxFile · 0.80
Equalizer.test.tsxFile · 0.80
findBoxesFunction · 0.80
parseSidxFunction · 0.80
buildSidxBodyFunction · 0.80
addRangeMethod · 0.80
MockSourceBufferClass · 0.80

Calls

no outgoing calls

Tested by 1

addRangeMethod · 0.64