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

Method push

lib/internal/fixed_queue.js:102–109  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

100 }
101
102 push(data) {
103 if (this.head.isFull()) {
104 // Head is full: Creates a new queue, sets the old queue's `.next` to it,
105 // and sets it as the new main queue.
106 this.head = this.head.next = FixedQueue.#pool.pop() ?? new FixedCircularBuffer();
107 }
108 this.head.push(data);
109 }
110
111 shift() {
112 const tail = this.tail;

Callers 15

socketCloseListenerFunction · 0.45
afterConnectFunction · 0.45
net.jsFile · 0.45
_http_outgoing.jsFile · 0.45
_writeRawFunction · 0.45
write_Function · 0.45
ucs2decodeFunction · 0.45
decodeFunction · 0.45
encodeFunction · 0.45
url.jsFile · 0.45
splitEscapedAltNamesFunction · 0.45
tls.jsFile · 0.45

Calls 2

popMethod · 0.80
isFullMethod · 0.45

Tested by

no test coverage detected