mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
d5e31807c5
* feat(streams): add toLines * chore(streams): remove testing code Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> * chore(streams): fmt * adjust(streams): change toLines return type to `ReadableStream<string>` - Change the return type from `AsyncGenerator<string>` to `ReadableStream<string>` - Change `readable` to only be of type `ReadableStream<Uint8Array>` - Add `options` argument of type `PipeOptions.` * work * work --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
39 lines
1.2 KiB
TypeScript
39 lines
1.2 KiB
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
/**
|
|
* Utilities for working with the
|
|
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Streams_API | Streams API}.
|
|
*
|
|
* Includes buffering and conversion.
|
|
*
|
|
* ```ts
|
|
* import { toText } from "@std/streams";
|
|
* import { assertEquals } from "@std/assert";
|
|
*
|
|
* const stream = ReadableStream.from(["Hello, world!"]);
|
|
* const text = await toText(stream);
|
|
*
|
|
* assertEquals(text, "Hello, world!");
|
|
* ```
|
|
*
|
|
* @module
|
|
*/
|
|
|
|
export * from "./buffer.ts";
|
|
export * from "./byte_slice_stream.ts";
|
|
export * from "./concat_readable_streams.ts";
|
|
export * from "./delimiter_stream.ts";
|
|
export * from "./early_zip_readable_streams.ts";
|
|
export * from "./limited_bytes_transform_stream.ts";
|
|
export * from "./limited_transform_stream.ts";
|
|
export * from "./merge_readable_streams.ts";
|
|
export * from "./fixed_chunk_stream.ts";
|
|
export * from "./text_delimiter_stream.ts";
|
|
export * from "./text_line_stream.ts";
|
|
export * from "./to_array_buffer.ts";
|
|
export * from "./to_blob.ts";
|
|
export * from "./to_json.ts";
|
|
export * from "./to_lines.ts";
|
|
export * from "./to_text.ts";
|
|
export * from "./to_transform_stream.ts";
|
|
export * from "./zip_readable_streams.ts";
|