MCPcopy Index your code
hub / github.com/garrytan/gstack / toArray

Method toArray

browse/src/buffers.ts:45–51  ·  view source on GitHub ↗

Return entries in insertion order (oldest first)

()

Source from the content-addressed store, hash-verified

43
44 /** Return entries in insertion order (oldest first) */
45 toArray(): T[] {
46 const result: T[] = [];
47 for (let i = 0; i < this._size; i++) {
48 result.push(this.buffer[(this.head + i) % this.capacity] as T);
49 }
50 return result;
51 }
52
53 /** Return the last N entries (most recent first → reversed to oldest first) */
54 last(n: number): T[] {

Callers 5

commands.test.tsFile · 0.45
getActivityAfterFunction · 0.45
getActivityHistoryFunction · 0.45
handleReadCommandFunction · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected