https://github.com/aleclarson/tab-delimited
Parse or build a string of tabular data
https://github.com/aleclarson/tab-delimited
nodejs parser string stringify
Last synced: 2 months ago
JSON representation
Parse or build a string of tabular data
- Host: GitHub
- URL: https://github.com/aleclarson/tab-delimited
- Owner: aleclarson
- License: mit
- Created: 2018-08-14T16:06:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T09:35:20.000Z (over 7 years ago)
- Last Synced: 2025-10-08T22:27:06.667Z (8 months ago)
- Topics: nodejs, parser, string, stringify
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tab-delimited v0.1.0
Parse or build a string of tabular data.
```js
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);
```