Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Rootencoder | 2,130 | 2 days ago | 215 | apache-2.0 | Java | |||||
RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP and SRT with all code written in Java/Kotlin | ||||||||||
Csv | 462 | 200 | 43 | 3 days ago | 37 | September 17, 2022 | 2 | mit | Elixir | |
CSV Decoding and Encoding for Elixir | ||||||||||
Cocoasplit | 338 | 3 years ago | 30 | Objective-C | ||||||
Stream/record your desktop/webcam to twitch/owned etc. | ||||||||||
Streaming Json Encoder | 294 | 6 | 5 | 9 months ago | 5 | December 27, 2021 | mit | PHP | ||
PHP library for iteratively encoding large JSON documents piece by piece | ||||||||||
Switch Remote Play | 220 | a year ago | 16 | gpl-3.0 | C++ | |||||
Let the switch remotely play PC games (similar to steam link or remote play) | ||||||||||
Mp4 Stream | 197 | 144 | 7 | 3 years ago | 13 | February 24, 2021 | 13 | mit | JavaScript | |
Streaming mp4 encoder and decoder | ||||||||||
Csv Write Stream | 188 | 442 | 139 | 3 years ago | 12 | April 28, 2016 | 12 | bsd-2-clause | JavaScript | |
A CSV encoder stream that produces properly escaped CSVs | ||||||||||
Decompress | 111 | 3 days ago | 8 | mit | OCaml | |||||
Pure OCaml implementation of Zlib. | ||||||||||
Audify | 96 | 1 | 2 | 5 months ago | 38 | April 11, 2023 | 11 | mit | C++ | |
Play/Stream/Record PCM audio data & Encode/Decode Opus to PCM audio data | ||||||||||
Jpg Stream | 75 | 25 | 8 | 6 years ago | 7 | August 23, 2017 | 3 | C++ | ||
A streaming JPEG encoder and decoder |
A CSV encoder stream that produces properly escaped CSVs.
A through stream. Write arrays of strings (or JS objects) and you will receive a properly escaped CSV stream out the other end.
var csvWriter = require('csv-write-stream')
var writer = csvWriter()
writer
is a duplex stream -- you can pipe data to it and it will emit a string for each line of the CSV
{
separator: ',',
newline: '\n',
headers: undefined,
sendHeaders: true
}
headers
can be an array of strings to use as the header row. if you don't specify a header row the keys of the first row written to the stream will be used as the header row IF the first row is an object (see the test suite for more details). if the sendHeaders
option is set to false, the headers will be used for ordering the data but will never be written to the stream.
example of auto headers:
var writer = csvWriter()
writer.pipe(fs.createWriteStream('out.csv'))
writer.write({hello: "world", foo: "bar", baz: "taco"})
writer.end()
// produces: hello,foo,baz\nworld,bar,taco\n
example of specifying headers:
var writer = csvWriter({ headers: ["hello", "foo"]})
writer.pipe(fs.createWriteStream('out.csv'))
writer.write(['world', 'bar'])
writer.end()
// produces: hello,foo\nworld,bar\n
example of not sending headers:
var writer = csvWriter({sendHeaders: false})
writer.pipe(fs.createWriteStream('out.csv'))
writer.write({hello: "world", foo: "bar", baz: "taco"})
writer.end()
// produces: world,bar,taco\n
see the test suite for more examples
$ npm install
$ npm test
This module also includes a CLI, which you can pipe ndjson to stdin and it will print csv on stdout. You can install it with npm install -g csv-write-stream
.
$ csv-write --help
usage: csv-write [-h] [-v] [--separator SEPARATOR] [--newline NEWLINE]
[--headers HEADERS [HEADERS ...]] [--no-send-headers]
A CSV encoder stream that produces properly escaped CSVs. JSON is read from
STDIN, formatted to CSV, and written to STDOUT.
Optional arguments:
-h, --help Show this help message and exit.
-v, --version Show program's version number and exit.
--separator SEPARATOR
The separator character to use. Defaults to ','.
--newline NEWLINE The newline character to use. Defaults to $'\n'.
--headers HEADERS [HEADERS ...]
The list of headers to use. If omitted, the keys of
the first row written to STDIN will be used
--no-send-headers Don't print the header row.
$ cat example.ndjson | csv-write > example.csv