Go to file
2024-06-23 19:46:03 -05:00
bun fix: npm packages, file renaming 2024-05-14 11:43:50 -05:00
src fix: bump node-stream-pipes 2024-06-23 19:46:03 -05:00
test/Test fix: bump node-stream-pipes 2024-06-23 19:46:03 -05:00
.gitignore feat: copy csv-stream 2024-05-14 11:41:29 -05:00
.tool-versions feat: copy csv-stream 2024-05-14 11:41:29 -05:00
bun.lockb fix: npm packages, file renaming 2024-05-14 11:43:50 -05:00
jsconfig.json feat: copy csv-stream 2024-05-14 11:41:29 -05:00
package.json chore: prepare v1.2.0 2024-06-22 19:40:56 -05:00
README.md fix: readme 2024-05-22 15:50:30 -05:00
spago.lock fix: bump node-stream-pipes 2024-06-23 19:46:03 -05:00
spago.yaml fix: bump node-stream-pipes 2024-06-23 19:46:03 -05:00

purescript-cbor-stream

Type-safe bindings for the streaming API of cbor-x

Installing

spago install cbor-stream
{bun|yarn|npm|pnpm} install cbor-x

Examples

Convert a cbor-encoded dataset to csv

import Pipes.Node.Stream as Pipes.Stream
import Pipes.Node.FS as Pipes.FS
import Pipes.Node.Buffer as Pipes.Buffer
import Pipes.CBOR as Pipes.CBOR
import Pipes.CSV as Pipes.CSV
import Pipes.Prelude ((>->))
import Pipes.Prelude as Pipes

Pipes.runEffect
  $ Pipes.FS.read "foo.bin"
    >-> Pipes.CBOR.decode @{id :: Int, name :: String}
    >-> Pipes.CSV.stringify
    >-> Pipes.FS.write "foo.csv"