2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2022-05-04 10:34:37 +00:00
|
|
|
/**
|
2022-08-11 11:51:20 +00:00
|
|
|
* Utilities for working with the
|
2024-01-31 22:19:46 +00:00
|
|
|
* {@link https://developer.mozilla.org/en-US/docs/Web/API/Streams_API | Streams API}.
|
2022-08-11 11:51:20 +00:00
|
|
|
*
|
|
|
|
* Includes buffering and conversion.
|
2022-05-04 10:34:37 +00:00
|
|
|
*
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
* ```ts
|
|
|
|
* import { toText } from "@std/streams";
|
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from `@std/assert` (#5199)
* refactor: import from `@std/assert`
* update
2024-06-30 08:30:10 +00:00
|
|
|
* import { assertEquals } from "@std/assert";
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
*
|
2024-08-06 09:21:57 +00:00
|
|
|
* const stream = ReadableStream.from(["Hello, world!"]);
|
docs(assert,cli,data-structures,expect,fmt,front-matter,html,http,jsonc,semver,streams,text,toml,webgpu): add snippet checks in module, function and class docs to doc checker (#4855)
* chore: add snippet checks to module docs
* fix
* work
* tweak
2024-05-31 02:01:46 +00:00
|
|
|
* const text = await toText(stream);
|
|
|
|
*
|
|
|
|
* assertEquals(text, "Hello, world!");
|
|
|
|
* ```
|
|
|
|
*
|
2022-05-04 10:34:37 +00:00
|
|
|
* @module
|
|
|
|
*/
|
2022-08-11 11:51:20 +00:00
|
|
|
|
2023-01-14 10:10:03 +00:00
|
|
|
export * from "./buffer.ts";
|
2022-12-15 05:24:37 +00:00
|
|
|
export * from "./byte_slice_stream.ts";
|
2024-05-20 22:22:01 +00:00
|
|
|
export * from "./concat_readable_streams.ts";
|
2022-12-15 05:24:37 +00:00
|
|
|
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 "./text_delimiter_stream.ts";
|
|
|
|
export * from "./text_line_stream.ts";
|
2023-09-13 08:21:52 +00:00
|
|
|
export * from "./to_array_buffer.ts";
|
|
|
|
export * from "./to_blob.ts";
|
|
|
|
export * from "./to_json.ts";
|
|
|
|
export * from "./to_text.ts";
|
2022-12-15 05:24:37 +00:00
|
|
|
export * from "./to_transform_stream.ts";
|
|
|
|
export * from "./zip_readable_streams.ts";
|