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

Function write

web.js:222–229  ·  view source on GitHub ↗
(chunk)

Source from the content-addressed store, hash-verified

220 writable: new WritableStream({
221 start (controller) { writableController = controller },
222 write (chunk) {
223 queue.push(chunk)
224 wakeOne(sourceWakeups)
225 if (queue.length >= QUEUE_HWM) {
226 return new Promise((resolve) => { writeWaiters.push(resolve) })
227 }
228 return undefined
229 },
230 close () {
231 // Clean end: let the source iterable return so the user's `for await`
232 // exits normally and pull() can run any flush logic.

Callers

nothing calls this directly

Calls 1

wakeOneFunction · 0.70

Tested by

no test coverage detected