(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1)
| 735 | const defaultSizeAlgorithm = function() { return 1 } |
| 736 | |
| 737 | function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark = 1, sizeAlgorithm = () => 1) { |
| 738 | assert(IsNonNegativeNumber(highWaterMark) === true); |
| 739 | const stream = new ReadableStream(ReadableStreamBrand.token); |
| 740 | InitializeReadableStream(stream); |
| 741 | const controller = new ReadableStreamDefaultController(ReadableStreamDefaultControllerBrand.token); |
| 742 | SetUpReadableStreamDefaultController( |
| 743 | stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm |
| 744 | ); |
| 745 | return stream; |
| 746 | } |
| 747 | function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) { |
| 748 | const stream = new ReadableStream(ReadableStreamBrand.token); |
| 749 | InitializeReadableStream(stream); |
no test coverage detected