periodic/elm-csv/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Csv

A parser for transforming CSV strings into usable input.

This library does its best to support RFC 4180, however, many CSV inputs do not strictly follow the standard. There are two major deviations assumed in this library.

  1. The \n character may be used instead of \r\n for new-lines.
  2. The trailing new-line may be omitted.

Types

type alias Csv =
{ headers : List String
, records : List (List String)
}

Represents a CSV document. All CSV documents are have a header row, even if that row is empty.

Functions

parse : String -> Result (List String) Csv

Parse a CSV string into it's constituent fields.