Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WinterTC55/iter-streams
/ functions
Functions
947 in github.com/WinterTC55/iter-streams
⨍
Functions
947
◇
Types & classes
113
↓ 528 callers
Method
push
* Create a new consumer. * Each call returns an independent async iterable from current buffer position. * Optional transforms are applied lazil
src/types.ts:618
↓ 238 callers
Function
benchmark
( name: string, fn: () => Promise<number | void>, options: { warmupIterations?: number; iteratio
benchmarks/utils.ts:78
↓ 197 callers
Method
write
Write single chunk. Rejects if buffer full (strict policy).
src/types.ts:179
↓ 182 callers
Method
pull
* Create a consumer - signature matches Stream.pull() (minus source). * Variadic: transforms, then options (optional). * Options detected by bei
src/types.ts:679
↓ 154 callers
Method
end
Signal end of stream. Returns total bytes written.
src/types.ts:191
↓ 149 callers
Method
writeSync
Try to write synchronously. Returns true if successful, false if buffer full.
src/types.ts:185
↓ 145 callers
Function
section
(title)
samples/util.js:44
↓ 135 callers
Method
close
* Close this end of the channel. * Signals end-of-stream to the connected peer. * Idempotent - multiple calls are safe.
src/types.ts:285
↓ 107 callers
Function
generateChunks
(chunkSize, numChunks)
benchmarks/html/bench-utils.js:182
↓ 90 callers
Function
from
* Create a ByteStreamReadable from a ByteInput or Streamable. * * - ByteInput (string, ArrayBuffer, ArrayBufferView): emits as single chunk * - Syn
src/from.js:789
↓ 89 callers
Method
next
()
src/share.ts:120
↓ 68 callers
Function
fromSync
* Create a SyncByteStreamReadable from a ByteInput or SyncStreamable. * * - ByteInput (string, ArrayBuffer, ArrayBufferView): emits as single chunk
src/from.js:704
↓ 62 callers
Function
push
* Create a push stream with optional transforms. * * @param args - Variadic: transforms, then options (optional) * @returns WriterIterablePair with
src/push.js:722
↓ 61 callers
Method
read
* Read next batch of chunks.
src/push.ts:379
↓ 51 callers
Function
reject
(value)
src/from.js:57
↓ 35 callers
Function
broadcast
* Create a broadcast channel for push-model multi-consumer streaming. * * @param options - Buffer limit and backpressure policy * @returns Writer a
src/broadcast.js:754
↓ 30 callers
Function
decode
(bytes: Uint8Array)
src/pull.test.ts:33
↓ 30 callers
Function
ondrain
* Wait for a drainable object's backpressure to clear. * * This is the primary way to integrate event-driven sources with the streams API. * Writer
src/consumers.js:615
↓ 29 callers
Function
decode
(bytes: Uint8Array)
src/from.test.ts:32
↓ 29 callers
Method
shift
* Remove and return the item at the head. O(1).
src/ringbuffer.ts:51
↓ 29 callers
Function
source
()
src/from.test.ts:80
↓ 27 callers
Method
fail
Put writer into terminal error state. Downstream sees error. Accepts any value as reason.
src/types.ts:197
↓ 26 callers
Function
createThreeWayComparison
( scenario: string, newStream: BenchmarkResult, webStream: BenchmarkResult, nodeStream: BenchmarkResul
benchmarks/utils.ts:332
↓ 26 callers
Method
return
()
src/share.ts:192
↓ 24 callers
Function
collectBytesSync
(source: Iterable<Uint8Array[]>)
src/from.test.ts:23
↓ 23 callers
Function
pull
* Create an async pull-through pipeline with transforms. * * @param source - The streamable source (sync or async) * @param args - Variadic transfo
src/pull.js:1156
↓ 22 callers
Function
createFourWayComparison
( scenario: string, newStream: BenchmarkResult, fastWebStream: BenchmarkResult, webStream: BenchmarkRe
benchmarks/utils.ts:365
↓ 22 callers
Method
get
* Read item at a logical index (0 = head). O(1).
src/ringbuffer.ts:63
↓ 21 callers
Function
uppercaseTransform
()
samples/util.js:49
↓ 20 callers
Function
collect
(source: AsyncIterable<Uint8Array[]>)
src/broadcast.test.ts:20
↓ 20 callers
Function
collectBytes
(source: AsyncIterable<Uint8Array[]>)
src/pull.test.ts:15
↓ 20 callers
Function
formatTime
(ms: number)
benchmarks/utils.ts:174
↓ 20 callers
Function
isSyncIterable
* Check if value is a sync iterable (has Symbol.iterator).
src/from.js:127
↓ 20 callers
Method
writev
Write multiple chunks atomically. Counts as 1 slot for backpressure.
src/types.ts:182
↓ 19 callers
Method
tryTrimBuffer
* Trim buffer from front if all consumers have advanced.
src/share.ts:377
↓ 18 callers
Function
collectBytes
(source: AsyncIterable<Uint8Array[]>)
src/from.test.ts:14
↓ 18 callers
Function
decode
(data: Uint8Array)
src/share.test.ts:14
↓ 18 callers
Function
share
* Create a shared source for pull-model multi-consumer streaming. * * @param source - The source to share * @param options - Buffer limit and backp
src/share.js:681
↓ 17 callers
Function
collect
(source: AsyncIterable<Uint8Array[]>)
src/share.test.ts:19
↓ 17 callers
Function
isAsyncIterable
* Check if value is an async iterable (has Symbol.asyncIterator).
src/from.js:136
↓ 17 callers
Function
measure
(name: string, iterations: number, fn: () => Promise<void> | void)
benchmarks/profile-systematic.ts:13
↓ 16 callers
Method
cancel
* Cancel all branches and close source. * If reason provided, branches see it as an error; otherwise clean completion.
src/types.ts:691
↓ 16 callers
Function
processChunk
(chunk: Uint8Array | null)
samples/15-encryption.ts:76
↓ 15 callers
Function
bench
(name, fn, options = {})
benchmarks/html/bench-utils.js:12
↓ 15 callers
Function
bytes
* Collect all bytes from an async or sync source. * * @param source - Iterable or async iterable yielding Uint8Array[] batches * @param options - O
src/consumers.js:189
↓ 15 callers
Function
formatBytesPerSec
(bytesPerSec: number)
benchmarks/utils.ts:160
↓ 14 callers
Function
collectText
(iterable: ByteStreamReadable)
src/push.test.ts:30
↓ 14 callers
Function
createAes256GcmDecryptTransform
* Create an AES-256-GCM decryption transform for use with Stream.pull().
samples/15-encryption.ts:146
↓ 14 callers
Function
createComparison
( scenario: string, newStream: BenchmarkResult, webStream: BenchmarkResult, labels?: { label1: string;
benchmarks/utils.ts:308
↓ 14 callers
Function
duplex
* Create a pair of connected duplex channels for bidirectional communication. * * Similar to Unix socketpair() - creates two endpoints where data wr
src/duplex.js:79
↓ 14 callers
Method
endSync
Signal end synchronously. Returns total bytes written, or -1 if cannot complete sync.
src/types.ts:194
↓ 12 callers
Method
_write
* Write a chunk to the broadcast buffer. * Returns true if write was accepted, false if buffer is full (strict/block policy).
src/broadcast.ts:277
↓ 12 callers
Function
decode
(chunk: Uint8Array)
samples/16-pipeline-sync.ts:16
↓ 12 callers
Function
measure
(name: string, iterations: number, fn: () => Promise<void> | void)
benchmarks/profile-bottlenecks.ts:13
↓ 12 callers
Function
pipeTo
* Write an async source through transforms to a writer. * * @param source - The source yielding Uint8Array[] batches (sync or async) * @param args
src/pull.js:1242
↓ 12 callers
Function
readBranch
(stream: ReadableStream<Uint8Array>)
benchmarks/15-fast-ws-tee-branching.ts:79
↓ 12 callers
Function
verb
(n)
src/from.js:11
↓ 12 callers
Function
verb
(n)
src/pull.js:20
↓ 12 callers
Method
write
(chunk: Uint8Array | string, _options?: WriteOptions)
samples/util.ts:39
↓ 11 callers
Function
concatBytes
* Concatenate multiple Uint8Arrays into a single Uint8Array.
src/utils.js:48
↓ 11 callers
Function
createAes256GcmEncryptTransform
* Create an AES-256-GCM encryption transform for use with Stream.pull(). * * Returns both the transform object and a function to get encryption para
samples/15-encryption.ts:56
↓ 11 callers
Function
createGunzipTransform
* Create a gzip decompression transform object for use with Stream.pull().
samples/14-compression.ts:154
↓ 11 callers
Function
createGzipCompressTransform
* Create a gzip compression transform object for use with Stream.pull(). * * Usage: Stream.pull(source, createGzipCompressTransform())
samples/14-compression.ts:46
↓ 11 callers
Function
decode
(data: Uint8Array)
src/broadcast.test.ts:15
↓ 11 callers
Function
measure
(name: string, iterations: number, fn: () => Promise<void> | void)
benchmarks/profile-systematic2.ts:13
↓ 11 callers
Function
pullSync
* Create a sync pull-through pipeline with transforms. * * @param source - The sync streamable source * @param args - Variadic transforms * @retur
src/pull.js:1130
↓ 11 callers
Method
rejectPendingWrites
* Reject all pending writes with an error.
src/push.ts:527
↓ 11 callers
Function
text
* Collect and decode text from an async or sync source. * * @param source - Iterable or async iterable yielding Uint8Array[] batches * @param optio
src/consumers.js:345
↓ 10 callers
Method
_canWrite
* Check if a write would be accepted (without actually writing). * Returns true if _write would accept a write, false otherwise.
src/broadcast.ts:384
↓ 10 callers
Method
clear
* Remove all items. O(n) for GC cleanup.
src/ringbuffer.ts:115
↓ 10 callers
Function
measureSustained
( name: string, fn: () => Promise<void>, )
benchmarks/21-memory-sustained.ts:130
↓ 10 callers
Method
read
()
samples/09-resource-management.ts:325
↓ 10 callers
Method
resolvePendingDrains
* Resolve all pending drains with a value.
src/push.ts:496
↓ 9 callers
Function
bytesSync
* Collect all bytes from a sync source. * * @param source - Sync iterable yielding Uint8Array[] batches * @param options - Optional limit * @retur
src/consumers.js:103
↓ 9 callers
Function
verb
(n)
src/consumers.js:21
↓ 8 callers
Method
canWriteSync
* Check if a sync write would be accepted (without actually writing). * Returns true if writeSync would accept a write, false otherwise.
src/push.ts:150
↓ 8 callers
Method
cleanup
* Clean up resources.
src/push.ts:536
↓ 8 callers
Function
collectBytesSync
(source: Iterable<Uint8Array[]>)
src/pull.test.ts:24
↓ 8 callers
Function
collectWebStreamBytes
(stream: ReadableStream<Uint8Array>)
benchmarks/11-fast-ws-throughput.ts:27
↓ 8 callers
Function
copyToBuffer
(chunk: Uint8Array)
samples/15-encryption.ts:23
↓ 8 callers
Function
fmtMB
(bytes: number)
benchmarks/21-memory-sustained.ts:208
↓ 8 callers
Function
shareSync
* Create a sync shared source for pull-model multi-consumer streaming. * * @param source - The sync source to share * @param options - Buffer limit
src/share.js:709
↓ 8 callers
Function
slowSource
()
samples/08-cancellation.ts:24
↓ 8 callers
Function
toReadableStream
* Convert a new Stream to a Web ReadableStream. * * Features: * - Proper backpressure (underlying source pull model) * - Error propagation * - Cl
samples/13-web-streams-interop.ts:83
↓ 8 callers
Function
transform
(chunks)
src/pull.test.ts:159
↓ 7 callers
Function
collect
(iterable: ByteStreamReadable)
src/push.test.ts:16
↓ 7 callers
Function
collectSync
(source: Iterable<Uint8Array[]>)
src/share.test.ts:28
↓ 7 callers
Function
createMockWriter
()
src/pull.test.ts:69
↓ 7 callers
Function
fromReadableStream
* Convert a Web ReadableStream to the new Stream API. * * Features: * - Proper backpressure handling (pull-based) * - Error propagation from Reada
samples/13-web-streams-interop.ts:31
↓ 7 callers
Function
merge
* Merge multiple async iterables by yielding values in temporal order. * Whichever source produces a value first gets yielded first. * * @param arg
src/consumers.js:648
↓ 6 callers
Function
allUint8Array
* Check if all chunks in an array are already Uint8Array (no strings). * Short-circuits on the first string found.
src/utils.js:27
↓ 6 callers
Function
assessSignificance
* Determine if speedup is statistically significant * Uses coefficient of variation to assess noise level
benchmarks/utils.ts:195
↓ 6 callers
Function
collectText
(source: Iterable<Uint8Array[]>)
samples/16-pipeline-sync.ts:28
↓ 6 callers
Function
count
(field: 'newVsFastWeb' | 'newVsWeb' | 'newVsNode', predicate: (c: FourWayComparison) => boolean)
benchmarks/utils.ts:446
↓ 6 callers
Function
createNewUppercase
()
benchmarks/html/benchmarks.js:80
↓ 6 callers
Method
createPendingWrite
* Create a pending write promise, optionally racing against a signal. * If the signal fires, the entry is removed from pendingWrites and the * p
src/push.ts:287
↓ 6 callers
Function
createTransform
()
benchmarks/13-fast-ws-transforms.ts:340
↓ 6 callers
Function
createTransform
()
benchmarks/14-fast-ws-pipelines.ts:344
↓ 6 callers
Function
decode
(chunk: Uint8Array)
samples/17-duplex-channels.ts:15
↓ 6 callers
Function
fromNodeReadable
* Convert a Node.js Readable stream to the new Stream API. * * Features: * - Proper backpressure handling * - Error propagation from Node.js strea
samples/12-nodejs-interop.ts:33
next →
1–100 of 947, ranked by callers