Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d957541
stream: add Transform.by utility function
Jun 25, 2019
9005e46
docs: stream.Transform.by typo
Jul 1, 2019
944f228
stream: Transform.by SourceIterator next optimization
Jul 1, 2019
84c84c9
docs: Transform.by doc tweaks
davidmarkclements Jul 2, 2019
a1937c7
docs: sort type-parser types alphabetically within their groups
davidmarkclements Jul 2, 2019
ad35382
docs: sort type-parser types alphabetically within their groups
davidmarkclements Jul 2, 2019
8d82c5b
docs: typo
davidmarkclements Jul 2, 2019
7a1ef77
docs: Transform.by clarify as async iterable
davidmarkclements Jul 2, 2019
5707445
stream: Transform. by remove unnecessary defensive code
davidmarkclements Jul 2, 2019
970ed3d
stream: Transform.by code style
davidmarkclements Jul 2, 2019
6e67a85
stream: Transform.by minor refactoring
Jul 3, 2019
98aebc5
streams: Transform.by check fn return value instead of fn instance
Jul 5, 2019
eee19c5
docs: emphasize Transform.by objectMode default behaviour
Jul 7, 2019
26e96be
docs: Transform.by function naming convention
davidmarkclements Jul 7, 2019
185a6f4
docs: add transform content to streams <-> async generators compatibi…
Jul 7, 2019
8e73c51
docs: includemissing parens
Jul 7, 2019
b73347f
tests: preempt conflict with #28566
Jul 7, 2019
9789a5b
tests: fix transform async iterator test
Jul 12, 2019
bad0bfd
docs: add meta data to Transform.by
davidmarkclements Jul 15, 2019
f2c8b22
stream: error handling bug fix, ensure stream is destroyed after proc…
Jul 15, 2019
001fe01
Update doc/api/stream.md
davidmarkclements Aug 5, 2019
9545ee0
Update doc/api/stream.md
davidmarkclements Aug 5, 2019
f0fa8b6
Update doc/api/stream.md
davidmarkclements Aug 5, 2019
b504b15
Update doc/api/stream.md
davidmarkclements Aug 5, 2019
447a895
streams: Transform.by, rm unncessary check
Sep 9, 2019
2fe96e4
lint fixes
Dec 13, 2019
1115d52
Merge branch 'transform-by' of github.com:davidmarkclements/node into…
safareli May 15, 2021
a8151fe
use implementation from @ronag
safareli May 15, 2021
3049db3
remove ERR_ARG_RETURN_VALUE_NOT_ASYNC_ITERABLE
safareli May 15, 2021
3ce77ac
fix review comment
safareli May 15, 2021
59791d0
fix lint errors
safareli May 15, 2021
6480563
fix md lint errors
safareli May 15, 2021
307e926
fix review comment
safareli May 17, 2021
382b9b5
rename test file
safareli May 17, 2021
58dc92d
try fix doc build error
safareli May 17, 2021
b4b5441
fix other doc error
safareli May 17, 2021
a985441
Apply stream.md suggestions from code review
safareli Jun 4, 2021
e0c1f0e
apply @aduh95 suggestions
safareli Jun 6, 2021
c5c862d
Apply suggestions from code review
safareli Jun 6, 2021
adc6059
Update doc/api/stream.md
safareli Jun 6, 2021
967989e
assign `encoding` to the async generator
safareli Jun 8, 2021
6ccafab
add encoding to yield
safareli Jun 9, 2021
9bccc23
try fix some tests
safareli Jun 15, 2021
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
Apply stream.md suggestions from code review
Co-authored-by: Rich Trott <[email protected]>
  • Loading branch information
safareli and Trott authored Jun 4, 2021
commit a98544111d453fabc59f3010a522bef7d0eb8f02
9 changes: 5 additions & 4 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,7 @@ const stream = addAbortSignal(
})();
```

### stream.Transform.by(asyncGeneratorFunction[, options])
### `stream.Transform.by(asyncGeneratorFunction[, options])`
<!-- YAML
added: REPLACEME
-->
Expand Down Expand Up @@ -3139,9 +3139,9 @@ readable.on('data', (chunk) => {
});
```

#### Creating Transform Streams with Async Generator Functions
#### Creating transform streams with async generator functions

We can construct a Node.js Transform stream with an asynchronous
We can construct a Node.js transform stream with an asynchronous
generator function using the `Transform.by()` utility method.

```js
Expand All @@ -3168,7 +3168,8 @@ transform.on('data', (chunk) => {
});
```

#### Piping to Writable Streams from Async Iterators
#### Piping to writable streams from async iterators
```

When writing to a writable stream from an async iterator, ensure correct
handling of backpressure and errors. [`stream.pipeline()`][] abstracts away
Expand Down