tysv

Types

pub opaque type Builder(a)
pub type Source {
  Stream(file_stream.FileStream)
  Text(String)
}

Constructors

Values

pub fn build(f: fn(a) -> b) -> Builder(fn(a) -> b)
pub fn col(
  builder: Builder(fn(a) -> b),
  parse: fn(String) -> Result(a, Nil),
) -> Builder(b)
pub fn col_sep(
  builder: Builder(a),
  col_sep: String,
) -> Builder(a)

Set column separator.

pub fn from(
  builder: Builder(a),
  source: Source,
) -> yielder.Yielder(a)
pub fn from_with_rest(
  builder: Builder(a),
  source: Source,
) -> yielder.Yielder(#(a, List(String)))
pub fn parsed(f: fn(a) -> b) -> fn(a) -> b
pub fn row_sep(
  builder: Builder(a),
  row_sep: String,
) -> Builder(a)

Set row separator. WARN: This does not work when the source provided in from is a FileStream

pub fn skip_header(
  builder: Builder(a),
  skip_header: Bool,
) -> Builder(a)

Enable/Disable skipping header.

Search Document