Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(streams): improve docs for stabilization #4852

Merged
merged 37 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fba942a
improve streams/buffer.ts
magurotuna May 23, 2024
65ba402
improve streams/byte_slice_stream.ts
magurotuna May 23, 2024
b56c2a6
improve streams/delimiter_stream.ts
magurotuna May 23, 2024
a3596c8
improve streams/early_zip_readable_streams.ts
magurotuna May 23, 2024
122a38e
improve streams/iterate_reader.ts
magurotuna May 23, 2024
23fa26a
improve streams/limited_bytes_transform_stream.ts
magurotuna May 23, 2024
5ed8f71
improve streams/limited_transform_stream.ts
magurotuna May 23, 2024
0bc0ad1
further improve streams/early_zip_readable_streams.ts
magurotuna May 23, 2024
7d0e56d
improve streams/merge_readable_streams.ts
magurotuna May 23, 2024
0e433c3
improve streams/readable_stream_from_reader.ts
magurotuna May 23, 2024
5af61ab
improve streams/readre_from_iterable.ts
magurotuna May 23, 2024
9e1f3e2
improve streams/reader_from_stream_reader.ts
magurotuna May 23, 2024
0654316
improve streams/text_delimiter_stream.ts
magurotuna May 24, 2024
dc3110a
improve streams/text_line_stream.ts
magurotuna May 24, 2024
c1573d3
improve streams/text_delimiter_stream.ts more
magurotuna May 24, 2024
2cb1daf
improve streams/to_array_buffer.ts
magurotuna May 24, 2024
2fe6c51
improve streams/to_blob.ts
magurotuna May 24, 2024
14f9ba0
improve streams/to_json.ts
magurotuna May 24, 2024
72da712
improve streams/to_json.ts
magurotuna May 24, 2024
1c6d378
improve streams/text_line_stream.ts more
magurotuna May 24, 2024
3acbf10
improve streams/to_transform_stream.ts
magurotuna May 24, 2024
797265c
improve streams/writable_stream_from_writer.ts
magurotuna May 24, 2024
d1ea855
improve streams/writer_from_stream_writer.ts
magurotuna May 24, 2024
2d93ced
improve streams/zip_readable_streams.ts
magurotuna May 24, 2024
2be8e5d
define interfaces for optional params
magurotuna May 24, 2024
5cac4e9
address lint warnings in buffer.ts
magurotuna May 24, 2024
abb7dd5
address lint warnings
magurotuna May 24, 2024
1710956
add streams/mod.ts to doc checker entrypoints
magurotuna May 24, 2024
76e5c61
Merge branch 'main' into magurotuna/streams-doc
magurotuna May 24, 2024
bbf4667
fix type error
magurotuna May 24, 2024
32b416c
tweak test data so spell checker will not complain
magurotuna May 24, 2024
08ef776
fix example code to make it work in windows
magurotuna May 24, 2024
f834d46
Merge branch 'main' into magurotuna/streams-doc
magurotuna May 24, 2024
9cba9c6
fix example code to make it work in windows (2)
magurotuna May 24, 2024
acde22a
Update streams/early_zip_readable_streams.ts
kt3k May 27, 2024
67f6732
Update streams/early_zip_readable_streams.ts
kt3k May 27, 2024
fd5b75b
Merge branch 'main' into magurotuna/streams-doc
magurotuna May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve streams/to_json.ts
  • Loading branch information
magurotuna committed May 24, 2024
commit 72da712b6adf3dce1ac5e424be7aa8b036a1ca34
5 changes: 3 additions & 2 deletions streams/to_text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ const textDecoder = new TextDecoder();
* Converts a {@linkcode ReadableSteam} of strings or {@linkcode Uint8Array}s
* to a single string. Works the same as {@linkcode Response.text}.
*
* @example
* @example Basic usage
* ```ts
* import { toText } from "@std/streams/to-text";
* import { assertEquals } from "@std/assert/assert-equals";
*
* const stream = ReadableStream.from(["Hello, ", "world!"]);
* await toText(stream); // "Hello, world!"
* assertEquals(await toText(stream), "Hello, world!");
* ```
*/
export async function toText(
Expand Down