# zstreams-csv-write

> Streaming CSV writer for nodejs

Latest version **1.0.0** (published 2020-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install zstreams-csv-write
pnpm add zstreams-csv-write
yarn add zstreams-csv-write
bun add zstreams-csv-write
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-10-19 |
| First published | 2015-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | giuocob |

## Links

- npm: https://www.npmjs.com/package/zstreams-csv-write
- Repository: https://github.com/zipscene/zstreams-csv-write
- Homepage: https://github.com/zipscene/zstreams-csv-write#readme
- Issues: https://github.com/zipscene/zstreams-csv-write/issues
- npm.io page: https://npm.io/package/zstreams-csv-write

## Dependencies (1)

- [zstreams](https://npm.io/package/zstreams.md) ^5.0.0

## Recent versions

- 1.0.0 (latest) — 2020-10-19
- 0.1.5 — 2019-02-21
- 0.1.4 — 2019-02-21
- 0.1.3 — 2017-08-28
- 0.1.2 — 2015-08-17
- 0.1.1 — 2015-08-17
- 0.1.0 — 2015-08-17

## README

# zstreams-csv-write
CSV streaming generator for nodejs

```javascript
var CSVWrite = require('zstreams-csv-write');

var input = [
	{ Name: 'George', Gender: 'M', Age: 32 },
	{ Name: 'Jackson, Steven', Gender: 'M', Age: 25 },
	{ Name: 'Maria "Killer" Sanchez', Age: 21 }
];
var csvWrite = new CSVWrite([ 'Name', 'Gender', 'Age' ]);
zstreams.fromArray(input).pipe(csvWrite).intoString(function(error, output) {
	console.log(output.split('\n'));
	// [
	//   'Name,Gender,Age',
	//   'George,M,32',
	//   '"Jackson, Steven",M,25',
	//   '"Maria ""Killer"" Sanchez",,21'
	// ]
});
```

It's a streaming CSV generator. 'Nuff said.

An options object can be provided as a second parameter to the constructor. The following options are accepted:
* `delimiter`: The record delimiter in the output data. Defaults to ','.
* `escape`: The record quote character. Defaults to '"'.

---
_Source: https://npm.io/package/zstreams-csv-write · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
