csv

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package csv is a require()-able host module for reading and writing CSV, the lingua franca of tabular data. It wraps Go's encoding/csv so quoting, embedded newlines, and custom delimiters all behave correctly.

API:

csv.parse(text [, opts])      -> rows
csv.stringify(data [, opts])  -> text
csv.read(path [, opts])       -> rows
csv.write(path, data [, opts])

opts is an optional table:

header    = false  -- when true, the first row names the columns and each
                      data row is returned as a { column = value } map
delimiter = ","    -- single-character field separator
numbers   = false  -- when true, numeric-looking cells parse to numbers

Without header, rows are returned as an array of string arrays. The row/grid <-> string conversions live in pure helpers tested in csv_test.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCSVPreload

func RegisterCSVPreload(v *vm.VM)

RegisterCSVPreload installs the loader under package.preload.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL