Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
transfer stream of LTSV
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

Build Status

introduction

transfer stream of LTSV parser

Usage

var ltsv2json = require('ltsv-stream').ltsv2json
  , fs = require('fs');

var ltsv = new ltsv2json({stringify: true});
fs.createReadStream('ltsv-access.log').pipe(ltsv).pipe(process.stdout);

you can also use parse() for parse LTSV format record into json.

var ltsv = new ltsv2json();
var record = ['host:127.0.0.1', 'ident:-'].join('\t');
ltsv.parse(record); // { host: '127.0.0.1, ident: '-' }

Option

var ltsv = new ltsv2json(option);
  • {stringify: false}: emit json object (default)
  • {stringify: true}: emit json string

License

MIT

Author

Jxck https://github.com/Jxck

Something went wrong with that request. Please try again.