ltsv.js
LTSV parser, formatter, validator and TransformStream
Installation
npm
$ npm install ltsv
Usage
node.js
const ltsv = ;
browser
Example
ltsv;// [ { label1: 'value1', label2: 'value2' },// { label1: 'value1', label2: 'value2' },// { label1: 'value1', label2: 'value2' } ] ltsv;// { label1: 'value1', label2: 'value2' }ltsv;// { label1: 'value1', label2: 'value2' }ltsv;// { label1: 'value1', label2: 'value2' } ltsv;// 'label1:value1\tlabel2:value2\nlabel1:value1\tlabel2:value2\nlabel1:value1\tlabel2:value2' ltsv;// 'label1:value1\tlabel2:value2'
const fs = ; const ltsv = ; const stream = ltsv; // access.log:// l1:v1\tl2:v2\n// l1:v1\tl2:v2\n// l1:v1\tl2:v2\nfs;// {"l1":"v1","l2":"v2"}{"l1":"v1","l2":"v2"}{"l1":"v1","l2":"v2"}
Functions
see docs or https://sasaplus1.github.io/ltsv.js
License
The MIT license.