diff options
Diffstat (limited to 'src/bun.js/builtins/js/ReadableStream.js')
-rw-r--r-- | src/bun.js/builtins/js/ReadableStream.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bun.js/builtins/js/ReadableStream.js b/src/bun.js/builtins/js/ReadableStream.js index 42c0fbdbc..8020b024d 100644 --- a/src/bun.js/builtins/js/ReadableStream.js +++ b/src/bun.js/builtins/js/ReadableStream.js @@ -443,3 +443,24 @@ function locked() return @isReadableStreamLocked(this); } + +function values(options) { + "use strict"; + var prototype = this?.constructor?.prototype; + if (!prototype) { + return @undefined; + } + @readableStreamDefineLazyIterators(prototype); + return prototype.values.@call(this, options); +} + +@linkTimeConstant +function lazyAsyncIterator() { + "use strict"; + var prototype = this?.constructor?.prototype; + if (!prototype) { + return @undefined; + } + @readableStreamDefineLazyIterators(prototype); + return prototype[globalThis.Symbol.asyncIterator].@call(this); +}
\ No newline at end of file |