A streaming CSV formatter for Node.js that transforms arrays of objects into CSV strings. Current stable version is 1.1.0. It aims for compatibility with the csv-spectrum CSV acid test suite. Key differentiators include streaming support (ideal for large datasets), customizable separator and newline, and the ability to specify headers explicitly or derive them from the first object. It can be used in the browser with browserify. The package is lightweight with no dependencies.
npm install csv-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates streaming CSV formatting from an array of objects to a CSV string.
Always specify headers explicitly via options or array to ensure all fields are included.
Ensure piped data consists of plain JavaScript objects.
Consider using a more robust CSV library if you need full RFC 4180 compliance.
Use `import csv from 'csv-formatter'` with ESM or `const csv = require('csv-formatter')` with CommonJS.Ensure you call csv() (e.g., .pipe(csv())) not just csv.
Add import { Readable } from 'stream' or const { Readable } = require('stream').No dependency data recorded yet.