(
data: string | Buffer,
opts?: { strict?: boolean },
)
| 207 | * mode so line-level diagnostics are always available. |
| 208 | */ |
| 209 | export function parseJSONL<T>( |
| 210 | data: string | Buffer, |
| 211 | opts?: { strict?: boolean }, |
| 212 | ): T[] { |
| 213 | if (bunJSONLParse && !opts?.strict) { |
| 214 | return parseJSONLBun<T>(data) |
| 215 | } |
| 216 | if (typeof data === 'string') { |
| 217 | return parseJSONLString<T>(data, opts?.strict) |
| 218 | } |
| 219 | return parseJSONLBuffer<T>(data, opts?.strict) |
| 220 | } |
| 221 | |
| 222 | const MAX_JSONL_READ_BYTES = 100 * 1024 * 1024 |
| 223 |
no test coverage detected