Module
Node.Stream.CSV.Stringify
- Package
- purescript-csv-stream
- Repository
- cakekindel/purescript-csv-stream
#CSVStringifier Source
type CSVStringifier :: Row Type -> Type
type CSVStringifier r = Stream (csv :: CSVWrite, read :: Read, write :: Write | r)
Stream transforming rows of stringified CSV values to CSV-formatted rows.
Write rows to the stream using write
.
Stringified rows are emitted on the Readable
end as string
chunks, meaning it can be treated as a Node.Stream.Readable
that has had setEncoding UTF8
invoked on it.
#Config Source
#toObjectStream Source
toObjectStream :: CSVStringifier () -> Transform (Array String) String
Convert the raw stream to a typed ObjectStream
#write Source
write :: forall @r rl a. RowToList r rl => WriteCSVRecord r rl => CSVStringifier a -> Record r -> Effect Unit
Write a record to a CSVStringifier.
The record will be emitted on the Readable
end
of the stream as a string chunk.