Files
bun.sh/packages
Claude Bot 2e120d5e8c feat(streams): implement ReadableStream.from() static method
Implements the WHATWG Streams spec ReadableStream.from() static method
that creates a ReadableStream from any iterable or async iterable.

Changes:
- Add readableStreamFrom() function in ReadableStream.ts
- Register the static method on the ReadableStream constructor in
  JSReadableStream.cpp
- Add type definitions in globals.d.ts and builtins.d.ts
- Add comprehensive tests for the new API

The implementation:
- Returns the same ReadableStream when passed a ReadableStream
- Supports sync iterables (arrays, Sets, Maps, generators, strings)
- Supports async iterables (async generators, custom async iterables)
- Properly handles iterator.return() on cancellation
- Correctly propagates errors from iterators

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 08:02:36 +00:00
..