Skip to content

aleclarson/tab-delimited

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tab-delimited v0.1.0

Parse or build a string of tabular data.

const {parse, stringify} = require('tab-delimited');

// Build a string of tabular data.
const string = stringify([
  ['a', 'b', 'c'],    // column names
  {a: 1, b: 2, c: 3}, // first row
  [4, 5, 6],          // second row
]);

assert(string == 'a\tb\tc\n1\t2\t3\n4\t5\t6');

// Parse a string of tabular data.
const data = parse(string);

assert(data.length == 2);
assert(data[0].a == 1);
assert(data[1].a == 4);

About

Parse or build a string of tabular data

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published