Description
What is the problem this feature would solve?
Creating a ReadableStream from an array (or any other iterable) requires a lot of boilerplate, as can be seen in these tests and this example.
What is the feature you are proposing to solve the problem?
The Streams standard now has a new utility method ReadableStream.from(asyncIterable), which adapts any sync or async iterable into a ReadableStream. Once Bun supports this method, creating a ReadableStream from an array would become a one-liner.
Specification: https://streams.spec.whatwg.org/#rs-from Spec change: https://github.com/whatwg/streams/pull/1083 WPT tests: https://github.com/web-platform-tests/wpt/pull/27009
Deno and Node.js also recently implemented this new method, see https://github.com/denoland/deno/pull/19446 and https://github.com/nodejs/node/pull/48395.
Since Bun is powered by JavaScriptCore, you may also want to look into their pull request: https://github.com/WebKit/WebKit/pull/12454
What alternatives have you considered?
No response