MCPcopy Index your code
hub / github.com/rvagg/through2 / wakeOne

Function wakeOne

web.js:132–135  ·  view source on GitHub ↗
(/** @type {Array<(value?: any) => void>} */ arr)

Source from the content-addressed store, hash-verified

130 const QUEUE_HWM = 16
131
132 const wakeOne = (/** @type {Array<(value?: any) => void>} */ arr) => {
133 const w = arr.shift()
134 if (w) w()
135 }
136 const wakeAll = (/** @type {Array<(value?: any) => void>} */ arr) => {
137 while (arr.length) /** @type {(value?: any) => void} */ (arr.shift())()
138 }

Callers 2

asyncGenTransformFunction · 0.70
writeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected