# json-to-csv-stream

> Convert a JSON array stream into CSV rows

Latest version **1.1.0** (published 2017-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install json-to-csv-stream
pnpm add json-to-csv-stream
yarn add json-to-csv-stream
bun add json-to-csv-stream
```

## 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.1.0 |
| Published | 2017-08-14 |
| First published | 2016-06-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | json-to-csv-stream |

## Links

- npm: https://www.npmjs.com/package/json-to-csv-stream
- Repository: https://github.com/bendrucker/json-to-csv-stream
- Homepage: https://github.com/bendrucker/json-to-csv-stream#readme
- Issues: https://github.com/bendrucker/json-to-csv-stream/issues
- npm.io page: https://npm.io/package/json-to-csv-stream

## Dependencies (4)

- [pumpify](https://npm.io/package/pumpify.md) ~1.3.4
- [through2](https://npm.io/package/through2.md) ~2.0.1
- [JSONStream](https://npm.io/package/JSONStream.md) ~1.1.2
- [csv-write-stream](https://npm.io/package/csv-write-stream.md) ~2.0.0

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-08-14
- 1.0.0 — 2016-06-10

## README

# json-to-csv-stream [![Build Status](https://travis-ci.org/bendrucker/json-to-csv-stream.svg?branch=master)](https://travis-ci.org/bendrucker/json-to-csv-stream)

> Convert a JSON array stream into CSV rows


## Install

```
$ npm install --save json-to-csv-stream
```


## Usage

```js
var jsonToCsv = require('json-to-csv-stream')
var fs = require('fs')

fs.createReadStream('./data.json')
  .pipe(jsonToCsv())
  .pipe(fs.createWriteStream('./data.csv'))
```

## API

#### `jsonToCsvStream(options)` -> `Transform`

##### options

Type: `object`  
Default: `{}`

###### path

Type: `any`
Default: `undefined`

A path for [`JSONStream.parse`](https://github.com/dominictarr/JSONStream#jsonstreamparsepath).

###### csv

Type: `object`  
Default: `undefined`

Options to pass to [`csv-write-stream`](https://github.com/maxogden/csv-write-stream#var-writer--csvwriteroptions).

## License

MIT © [Ben Drucker](http://bendrucker.me)

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