Skip to main content
Home
This release is 53 versions behind 1.0.16 — the latest version of @std/streams. Jump to latest

Utilities for working with the Web Streams API

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 years ago (0.197.0)

default

Utilities for working with the Streams API.

c
Buffer

A variable-sized buffer of bytes with read() and write() methods.

c
ByteSliceStream

A transform stream that only transforms from the zero-indexed start and end bytes (both inclusive).

f
copy

Copies from src to dst until either EOF (null) is read from src or an error occurs. It resolves to the number of bytes copied or rejects with the first error encountered while copying.

T
DelimiterDisposition

Disposition of the delimiter.

c
DelimiterStream

Divide a stream into chunks delimited by a given byte sequence.

I
DelimiterStreamOptions
No documentation available
f
earlyZipReadableStreams

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the others will be cancelled.

f
iterateReader

Turns a Reader, r, into an async iterator.

f
iterateReaderSync

Turns a ReaderSync, r, into an iterator.

c
LimitedBytesTransformStream

A TransformStream that will only read & enqueue size amount of bytes. This operation is chunk based and not BYOB based, and as such will read more than needed.

c
LimitedTransformStream

A TransformStream that will only read & enqueue size amount of chunks.

f
mergeReadableStreams

Merge multiple streams into a single one, not taking order into account. If a stream ends before other ones, the other will continue adding data, and the finished one will not add any more data.

f
readableStreamFromReader

Create a ReadableStream<Uint8Array> from a Reader.

f
readAll

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

f
readAllSync

Synchronously reads Reader r until EOF (null) and returns the content as Uint8Array.

f
readerFromIterable

Create a Reader from an iterable of Uint8Arrays.

f
readerFromStreamReader

Create a Reader from a ReadableStreamDefaultReader.

c
TextDelimiterStream

Transform a stream into a stream where each chunk is divided by a given delimiter.

c
TextLineStream

Transform a stream into a stream where each chunk is divided by a newline, be it \n or \r\n. \r can be enabled via the allowCR option.

f
toTransformStream

Convert the generator function into a TransformStream.

f
writableStreamFromWriter

Create a WritableStream from a Writer.

I
WritableStreamFromWriterOptions
No documentation available
f
writeAll

Write all the content of the array buffer (arr) to the writer (w).

f
writeAllSync

Synchronously write all the content of the array buffer (arr) to the writer (w).

f
writerFromStreamWriter

Create a Writer from a WritableStreamDefaultWriter.

f
zipReadableStreams

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the others will continue adding data in order, and the finished one will not add any more data.

f
readableStreamFromIterable
No documentation available
c
Buffer

A variable-sized buffer of bytes with read() and write() methods.

c
ByteSliceStream

A transform stream that only transforms from the zero-indexed start and end bytes (both inclusive).

f
copy

Copies from src to dst until either EOF (null) is read from src or an error occurs. It resolves to the number of bytes copied or rejects with the first error encountered while copying.

T
DelimiterDisposition

Disposition of the delimiter.

c
DelimiterStream

Divide a stream into chunks delimited by a given byte sequence.

I
DelimiterStreamOptions
No documentation available
f
earlyZipReadableStreams

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the others will be cancelled.

f
iterateReader

Turns a Reader, r, into an async iterator.

f
iterateReaderSync

Turns a ReaderSync, r, into an iterator.

c
LimitedBytesTransformStream

A TransformStream that will only read & enqueue size amount of bytes. This operation is chunk based and not BYOB based, and as such will read more than needed.

c
LimitedTransformStream

A TransformStream that will only read & enqueue size amount of chunks.

f
mergeReadableStreams

Merge multiple streams into a single one, not taking order into account. If a stream ends before other ones, the other will continue adding data, and the finished one will not add any more data.

f
readAll

Read Reader r until EOF (null) and resolve to the content as Uint8Array`.

f
readAllSync

Synchronously reads Reader r until EOF (null) and returns the content as Uint8Array.

f
readableStreamFromIterable
No documentation available
f
readableStreamFromReader

Create a ReadableStream<Uint8Array> from a Reader.

f
readerFromIterable

Create a Reader from an iterable of Uint8Arrays.

f
readerFromStreamReader

Create a Reader from a ReadableStreamDefaultReader.

c
TextDelimiterStream

Transform a stream into a stream where each chunk is divided by a given delimiter.

c
TextLineStream

Transform a stream into a stream where each chunk is divided by a newline, be it \n or \r\n. \r can be enabled via the allowCR option.

f
toTransformStream

Convert the generator function into a TransformStream.

f
writableStreamFromWriter

Create a WritableStream from a Writer.

I
WritableStreamFromWriterOptions
No documentation available
f
writeAll

Write all the content of the array buffer (arr) to the writer (w).

f
writeAllSync

Synchronously write all the content of the array buffer (arr) to the writer (w).

f
writerFromStreamWriter

Create a Writer from a WritableStreamDefaultWriter.

f
zipReadableStreams

Merge multiple streams into a single one, taking order into account, and each stream will wait for a chunk to enqueue before the next stream can append another chunk. If a stream ends before other ones, the others will continue adding data in order, and the finished one will not add any more data.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.