Module

Node.Stream.CBOR.Encode

Package
purescript-cbor-stream
Repository
cakekindel/purescript-cbor-stream

#CBOREncode Source

#CBOREncoder Source

type CBOREncoder :: Row Type -> Typetype CBOREncoder r = Stream (csv :: CBOREncode, read :: Read, write :: Write | r)

#makeImpl Source

makeImpl :: forall r. Foreign -> Effect (Stream r)

#writeImpl Source

writeImpl :: forall r. Stream r -> Foreign -> Effect Unit

#recordToForeign Source

#make Source

make :: forall r missing extra minimal minimalExtra. Union r missing (Options extra) => Union r (useFloat32 :: F32) minimal => Nub minimal (useFloat32 :: F32 | minimalExtra) => Record r -> Effect (CBOREncoder ())

Create a raw Transform stream that accepts chunks of Array String, and transforms them into string CSV rows.

Requires an ordered array of column names.

#toObjectStream Source

toObjectStream :: CBOREncoder () -> Transform Foreign Buffer

Convert the raw stream to a typed ObjectStream

#write Source

write :: forall a r. WriteCBOR a => CBOREncoder r -> a -> Effect Unit

Write a record to a CSVStringifier.

The record will be emitted on the Readable end of the stream as a string chunk.