0.0.1 • Published 9 years ago

timestamp-stream v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

timestamp-stream

pipe newline-separated data in -> get a time-series formatted object out

example

var stamper = new StampStream({
    sep: '\n',
    timeStamper: getTimeFunc
});

someDataStream.pipe(stamper).pipe(process.stdout);

// { "x":"2015-03-21T04:33:18.254Z","y": dataFromStream }
// { "x":"2015-03-21T04:34:18.354Z","y": dataFromStream }
// { "x":"2015-03-21T04:35:18.294Z","y": dataFromStream }

methods

var TimeStampStream = require('timestamp-stream');

var stamper = new TimeStampStream()

install

npm install timestamp-stream

license

MIT