Commit 33b1574
authored
lib: add support for readable byte streams to .toWeb()
Add support for the creation of ReadableByteStream to Readable.toWeb()
and Duplex.toWeb()
This enables the use of .getReader({ mode: "byob" }) on
e.g. socket().toWeb()
Refs: #56004 (comment)
Refs: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_byte_streams
PR-URL: #58664
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
Reviewed-By: Mattias Buelens <[email protected]>
Reviewed-By: James M Snell <[email protected]>1 parent 1ce22dd commit 33b1574
File tree
7 files changed
+132
-10
lines changed- doc/api
- lib/internal
- streams
- webstreams
- test/parallel
7 files changed
+132
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3188 | 3188 | | |
3189 | 3189 | | |
3190 | 3190 | | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
3191 | 3194 | | |
3192 | 3195 | | |
3193 | 3196 | | |
| |||
3210 | 3213 | | |
3211 | 3214 | | |
3212 | 3215 | | |
| 3216 | + | |
3213 | 3217 | | |
3214 | 3218 | | |
3215 | 3219 | | |
| |||
3383 | 3387 | | |
3384 | 3388 | | |
3385 | 3389 | | |
3386 | | - | |
| 3390 | + | |
3387 | 3391 | | |
3388 | 3392 | | |
3389 | 3393 | | |
3390 | 3394 | | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
3391 | 3398 | | |
3392 | 3399 | | |
3393 | 3400 | | |
| |||
3396 | 3403 | | |
3397 | 3404 | | |
3398 | 3405 | | |
| 3406 | + | |
| 3407 | + | |
3399 | 3408 | | |
3400 | 3409 | | |
3401 | 3410 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1777 | 1777 | | |
1778 | 1778 | | |
1779 | 1779 | | |
1780 | | - | |
| 1780 | + | |
1781 | 1781 | | |
1782 | 1782 | | |
1783 | 1783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
417 | 418 | | |
418 | 419 | | |
419 | 420 | | |
420 | | - | |
| 421 | + | |
| 422 | + | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
| |||
432 | 434 | | |
433 | 435 | | |
434 | 436 | | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
435 | 443 | | |
436 | 444 | | |
437 | 445 | | |
| |||
443 | 451 | | |
444 | 452 | | |
445 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
446 | 457 | | |
447 | 458 | | |
448 | 459 | | |
| |||
491 | 502 | | |
492 | 503 | | |
493 | 504 | | |
494 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
495 | 518 | | |
496 | 519 | | |
497 | 520 | | |
| |||
601 | 624 | | |
602 | 625 | | |
603 | 626 | | |
| 627 | + | |
604 | 628 | | |
605 | 629 | | |
606 | | - | |
| 630 | + | |
607 | 631 | | |
608 | 632 | | |
609 | 633 | | |
| |||
615 | 639 | | |
616 | 640 | | |
617 | 641 | | |
| 642 | + | |
| 643 | + | |
618 | 644 | | |
619 | 645 | | |
620 | | - | |
| 646 | + | |
621 | 647 | | |
622 | 648 | | |
623 | 649 | | |
| |||
633 | 659 | | |
634 | 660 | | |
635 | 661 | | |
636 | | - | |
637 | | - | |
| 662 | + | |
| 663 | + | |
638 | 664 | | |
639 | 665 | | |
640 | 666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments