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

Function finished

test/parallel/test-http-max-http-headers.js:26–30  ·  view source on GitHub ↗
(client, callback)

Source from the content-addressed store, hash-verified

24}
25
26function finished(client, callback) {
27 ['abort', 'error', 'end'].forEach((e) => {
28 client.on(e, once(() => setImmediate(callback)));
29 });
30}
31
32function fillHeaders(headers, currentSize, valid = false) {
33 // `llhttp` counts actual header name/value sizes, excluding the whitespace

Calls 4

onceFunction · 0.70
forEachMethod · 0.65
setImmediateFunction · 0.50
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…