etl
Version:
Collection of stream-based components that form an ETL pipeline
19 lines (14 loc) • 416 B
JavaScript
var Streamz = require('streamz'),
util = require('util');
function Stringify(indent,replacer) {
if (!(this instanceof Streamz))
return new Stringify(indent,replacer);
Streamz.call(this);
this.indent = indent;
this.replacer = replacer;
}
util.inherits(Stringify,Streamz);
Stringify.prototype._fn = function(d) {
return JSON.stringify(d,this.replacer,this.indent);
};
module.exports = Stringify;