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

@std/streams@0.224.5
Built and signed on GitHub Actions

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.224.5)

default

Utilities for working with the Streams API.

c
Buffer

A variable-sized buffer of bytes with readable and writable getters that allows you to work with Web Streams API.

I
BufferBytesOptions

Options for Buffer.bytes.

c
ByteSliceStream

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

f
concatReadableStreams

Concatenates multiple ReadableStreams into a single ordered ReadableStream.

T
DelimiterDisposition

Disposition of the delimiter for DelimiterStreamOptions.

c
DelimiterStream

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

I
DelimiterStreamOptions

Options for DelimiterStream.

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.

c
LimitedBytesTransformStream

A TransformStream that will only read & enqueue chunks until the total amount of enqueued data exceeds size. The last chunk that would exceed the limit will NOT be enqueued, in which case a RangeError is thrown when options.error is set to true, otherwise the stream is just terminated.

I
LimitedBytesTransformStreamOptions

Options for LimitedBytesTransformStream.

c
LimitedTransformStream

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

I
LimitedTransformStreamOptions

Options for LimitedTransformStream

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.

c
TextDelimiterStream

Transform a stream string 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.

I
TextLineStreamOptions

Options for TextLineStream.

f
toArrayBuffer

Converts a ReadableStream of Uint8Arrays to an ArrayBuffer. Works the same as Response.arrayBuffer.

f
toBlob

Converts a ReadableStream of Uint8Arrays to a Blob. Works the same as Response.blob.

f
toJson

Converts a JSON-formatted ReadableSteam of strings or Uint8Arrays to an object. Works the same as Response.json.

f
toText

Converts a ReadableSteam of strings or Uint8Arrays to a single string. Works the same as Response.text.

f
toTransformStream

Convert the generator function into a TransformStream.

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.

f
iterateReader

Turns a Reader, r, into an async iterator.

f
iterateReaderSync

Turns a ReaderSync, r, into an iterator.

I
ReadableStreamFromReaderOptions

Options for readableStreamFromReader.

f
readerFromIterable

Create a Reader from an iterable of Uint8Arrays.

I
WritableStreamFromWriterOptions

Options for writableStreamFromWriter.

c
Buffer

A variable-sized buffer of bytes with readable and writable getters that allows you to work with Web Streams API.

I
BufferBytesOptions

Options for Buffer.bytes.

c
ByteSliceStream

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

f
concatReadableStreams

Concatenates multiple ReadableStreams into a single ordered ReadableStream.

T
DelimiterDisposition

Disposition of the delimiter for DelimiterStreamOptions.

c
DelimiterStream

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

I
DelimiterStreamOptions

Options for DelimiterStream.

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.

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 chunks until the total amount of enqueued data exceeds size. The last chunk that would exceed the limit will NOT be enqueued, in which case a RangeError is thrown when options.error is set to true, otherwise the stream is just terminated.

I
LimitedBytesTransformStreamOptions

Options for LimitedBytesTransformStream.

c
LimitedTransformStream

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

I
LimitedTransformStreamOptions

Options for LimitedTransformStream

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
readerFromIterable

Create a Reader from an iterable of Uint8Arrays.

c
TextDelimiterStream

Transform a stream string 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.

I
TextLineStreamOptions

Options for TextLineStream.

f
toArrayBuffer

Converts a ReadableStream of Uint8Arrays to an ArrayBuffer. Works the same as Response.arrayBuffer.

f
toBlob

Converts a ReadableStream of Uint8Arrays to a Blob. Works the same as Response.blob.

f
toJson

Converts a JSON-formatted ReadableSteam of strings or Uint8Arrays to an object. Works the same as Response.json.

f
toText

Converts a ReadableSteam of strings or Uint8Arrays to a single string. Works the same as Response.text.

f
toTransformStream

Convert the generator function into a TransformStream.

I
WritableStreamFromWriterOptions

Options for writableStreamFromWriter.

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.

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.