MCPcopy Index your code
hub / github.com/nodejs/node / push

Method push

lib/internal/streams/iter/ringbuffer.js:35–41  ·  view source on GitHub ↗

* Append an item to the tail. O(1) amortized.

(item)

Source from the content-addressed store, hash-verified

33 * Append an item to the tail. O(1) amortized.
34 */
35 push(item) {
36 if (this.#size > this.#mask) {
37 this.#grow();
38 }
39 this.#backing[(this.#head + this.#size) & this.#mask] = item;
40 this.#size++;
41 }
42
43 /**
44 * Prepend an item to the head. O(1) amortized.

Callers 15

_transformFunction · 0.45
_flushFunction · 0.45
hash.jsFile · 0.45
initializeCjsConditionsFunction · 0.45
#tryPushMethod · 0.45
runTestFileFunction · 0.45
formatLinesToRangesFunction · 0.45
junit.jsFile · 0.45
readFunction · 0.45
onSessionQlogFunction · 0.45
_readMethod · 0.45

Calls 1

#growMethod · 0.95

Tested by

no test coverage detected