Commit 4d73ea7
lib: use kEmptyObject and update JSDoc in webstreams
Use kEmptyObject as default value of strategy.
Plus, make reason and chunk as optional.
And refactor to use validateBuffer.
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#transformstreamdefaultcontrollerenqueuechunk
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#transformstreamdefaultcontrollererrorreason
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#writablestreamdefaultwriterabortreason
Refs: https://github.com/nodejs/node/blob/main/doc/api/webstreams.md#writablestreamdefaultwriterwritechunk
PR-URL: #46183
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>1 parent 1015a60 commit 4d73ea7Copy full SHA for 4d73ea7
File tree
Expand file treeCollapse file tree
3 files changed
+10
-17
lines changedOpen diff view settings
Filter options
- lib/internal/webstreams
Expand file treeCollapse file tree
3 files changed
+10
-17
lines changedOpen diff view settings
Collapse file
lib/internal/webstreams/readablestream.js
Copy file name to clipboardExpand all lines: lib/internal/webstreams/readablestream.js+1-10Lines changed: 1 addition & 10 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1132 | 1132 | |
1133 | 1133 | |
1134 | 1134 | |
1135 | | - |
1136 | | - |
1137 | | - |
1138 | | - |
1139 | | - |
1140 | | - |
1141 | | - |
1142 | | - |
1143 | | - |
1144 | | - |
| 1135 | + |
1145 | 1136 | |
1146 | 1137 | |
1147 | 1138 | |
|
Collapse file
lib/internal/webstreams/transformstream.js
Copy file name to clipboardExpand all lines: lib/internal/webstreams/transformstream.js+5-4Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
| 29 | + |
29 | 30 | |
30 | 31 | |
31 | 32 | |
| ||
117 | 118 | |
118 | 119 | |
119 | 120 | |
120 | | - |
121 | | - |
| 121 | + |
| 122 | + |
122 | 123 | |
123 | 124 | |
124 | 125 | |
| ||
292 | 293 | |
293 | 294 | |
294 | 295 | |
295 | | - |
| 296 | + |
296 | 297 | |
297 | 298 | |
298 | 299 | |
| ||
301 | 302 | |
302 | 303 | |
303 | 304 | |
304 | | - |
| 305 | + |
305 | 306 | |
306 | 307 | |
307 | 308 | |
|
Collapse file
lib/internal/webstreams/writablestream.js
Copy file name to clipboardExpand all lines: lib/internal/webstreams/writablestream.js+4-3Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
33 | 33 | |
34 | 34 | |
35 | 35 | |
| 36 | + |
36 | 37 | |
37 | 38 | |
38 | 39 | |
| ||
148 | 149 | |
149 | 150 | |
150 | 151 | |
151 | | - |
| 152 | + |
152 | 153 | |
153 | 154 | |
154 | 155 | |
| ||
217 | 218 | |
218 | 219 | |
219 | 220 | |
220 | | - |
| 221 | + |
221 | 222 | |
222 | 223 | |
223 | 224 | |
| ||
475 | 476 | |
476 | 477 | |
477 | 478 | |
478 | | - |
| 479 | + |
479 | 480 | |
480 | 481 | |
481 | 482 | |
|
0 commit comments