@talosjs/csv is a small, streaming CSV reader built on top of Bun. It parses CSV files line by line into typed records, handles quoted fields and custom separators, lets you skip rows by pattern, and can convert a file directly to JSON or YAML without loading everything into memory.
Installation
Add the package with Bun.Usage
Create aCsv instance with a file path and iterate rows with the async generator load. The first row is treated as the header and each subsequent row becomes an object keyed by those headers. You can pass a type parameter for typed rows.
,, ;, :, |, or \t).
ignore option. Each key maps to a pattern, and matching rows are excluded from iteration.
ignore filter.
CsvException you can catch and inspect.
What it’s good for
This is for files that are too large to buffer whole, where you want to walk them row by row and get back typed records keyed off the header. Quoted fields and escaped quotes are handled, and the separator isn’t fixed to a comma: semicolon, tab, pipe, and colon all work. Along the way you can drop rows by pattern, or skip iteration entirely and convert the file to JSON or YAML in one call. For a tiny, well-formed CSV string you already hold in memory, a quicksplit does the job. This package targets file-based, streamed reading and needs the Bun runtime.