eterps / csv

A CSV parser library for the Gleam programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

csv

A CSV parser for the Gleam programming language

Usage

import csv

csv.parse("id,value\n1,one\n2,two\n")
// csv.Csv(
//  headers: ["id", "value"],
//  records: [
//               ["1", "one"],
//               ["2", "two"]
//           ]
// )

TODO

  • Support \r/\n combinations
  • Strip whitespace
  • Support quoting
  • Move to a full blown parser or don't support quoting for now
  • Improve documentation

Quick start

# Build the project
rebar3 compile

# Run the eunit tests
rebar3 eunit

# Run the Erlang REPL
rebar3 shell

Installation

If available in Hex this package can be installed by adding csv to your rebar.config dependencies:

{deps, [
    csv
]}.

About

A CSV parser library for the Gleam programming language

License:Apache License 2.0


Languages

Language:Erlang 100.0%