(data: string | Buffer)
| 180 | * falls back to indexOf-based scanning otherwise. |
| 181 | */ |
| 182 | export function parseJSONL<T>(data: string | Buffer): T[] { |
| 183 | if (bunJSONLParse) { |
| 184 | return parseJSONLBun<T>(data) |
| 185 | } |
| 186 | if (typeof data === 'string') { |
| 187 | return parseJSONLString<T>(data) |
| 188 | } |
| 189 | return parseJSONLBuffer<T>(data) |
| 190 | } |
| 191 | |
| 192 | const MAX_JSONL_READ_BYTES = 100 * 1024 * 1024 |
| 193 |
no test coverage detected