ltsv-stream

0.0.2 • Public • Published

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 josn.

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i ltsv-stream

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • jxck