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

Function classicControllerEnqueue

test/web.js:47–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47export async function classicControllerEnqueue () {
48 const ts = transform((chunk, controller) => {
49 controller.enqueue(chunk)
50 controller.enqueue(chunk)
51 })
52 const out = await pipeThrough([encoder.encode('a'), encoder.encode('b')], ts)
53 eq(decoder.decode(concat(out)), 'aabb')
54}
55
56export async function asyncReturnedValueEnqueued () {
57 const ts = transform(async (chunk) => chunk % 2 === 0 ? chunk : undefined)

Callers

nothing calls this directly

Calls 4

transformFunction · 0.90
pipeThroughFunction · 0.85
concatFunction · 0.85
eqFunction · 0.70

Tested by

no test coverage detected