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