timestamp-stream
v0.0.1
Published
pipe data in -> get a time-series formatted object out
Downloads
4
Readme
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