Files
bun.sh/packages
Claude Bot 033fc38feb feat(ReadableStream): add .jsonl() method for parsing newline-delimited JSON
Adds a new `.jsonl()` method to ReadableStream that returns an async iterable
for parsing newline-delimited JSON (JSONL/NDJSON) streams.

Example usage:
```js
for await (const object of response.body.jsonl()) {
  console.log(object);
}
```

The implementation:
- Reads from the stream chunk by chunk as text
- Buffers incomplete lines across chunks
- Parses complete lines as JSON and yields each object
- Handles trailing content without a final newline
- Skips empty/whitespace-only lines

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-30 04:25:25 +00:00
..