@paulll/ascii-separated-values
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

ascii-separated-values

ASCII (\x1f, \x1e)-separated values file streaming parser/writer.

Since almost any CSV parser/writer implementation is different (just look at jqnatividad/qsv: there are different supported syntaxes per command, no consistency at all!), I think there's time for brand new standard.

xkcd about standards

Just kidding, it isn't even something new, there's always been a Delimiter-Separated Values format, so ASV files should work with any DSV/CSV parser that allows custom field/row delimiters. There are special reserved symbols 'RECORD SEPARATOR' aka \x1e and 'FIELD SEPARATOR' aka \x1f in almost any text encoding, but for some unknown reason everyone just proposes their new standards with complex escaping rules, or even without escaping assuming that there will never be text with their uncommon separator like '|'. Also there are people who also faced such escaping problem, but again offer crutch solutions like using \00 as field separator.

Format

In terms of common CSV/DSV settings:

{
    "quote":      "never",
    "escape":     "never",
    "delimiter":  "\x1f",
    "terminator": "\x1e"
}

Readme

Keywords

Package Sidebar

Install

npm i @paulll/ascii-separated-values

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

21.7 kB

Total Files

9

Last publish

Collaborators

  • paulll