actions: { convert(ctx) { const pass = new Stream.Transform({ transform: function(chunk, encoding, done) { this.push(chunk.toString().toUpperCase());
function PubStream(client, name, dest) { if (!(this instanceof PubStream)) return new PubStream(client, name, dest); stream.Transform.call(this, {objectMode: true}); this.dest = dest; this.client = client; this.cmd = name; this.pipe(client.output); }
function ToGrid(debug) { stream.Transform.call(this, {objectMode: true}); this.debug = debug; }
function SwitchBoard(sock) { if (!(this instanceof SwitchBoard)) return new SwitchBoard(sock); stream.Transform.call(this, {objectMode: true}); sock.index = getClientNumber(); crossbar[sock.index] = sock; this.sock = sock; }
function ReadStream (client, name) { stream.Transform.call(this, {objectMode: true}); this.client = client; this.name = name; if (this.opt.text) { this._transform = function (chunk, encoding, done) { done(null, JSON.stringify(chunk) + '\n'); }; } else { this._transform = function (chunk, encoding, done) { done(null, chunk); }; } }
function Consumer(debug) { if (!(this instanceof Consumer)) return new Consumer(debug); stream.Transform.call(this, {objectMode: true}); this.subscriber = {}; this.streams = []; this.debug = debug; }
function AbortStream(highWaterMark, chunkSize) { this.highWaterMark = highWaterMark; this.chunkSize = chunkSize; stream.Transform.call(this, { highWaterMark: this.highWaterMark * 2 }); // var self = this; // setInterval(function () { // console.log(self._readableState.length) // }, 10000) }
function sseTransform(options) { if (!(this instanceof sseTransform)) return new sseTransform(options); stream.Transform.call(this, options || {}); }
function Trans(options) { stream.Transform.call(this, options); // this._key = options.key; this._value = null; // this.on('finish', function() { // Cache.store[this._key] = this._value.toString(); // }); }
function FromGrid() { stream.Transform.call(this, {objectMode: true}); this._buf = null; }
function Obj2line() { stream.Transform.call(this, {objectMode: true}); }
function StreamToGrid(sock, id, sid) { stream.Transform.call(this); this.sock = sock; this.clientId = id; this.clientStreamId = sid; }
function TransformStream() { stream.Transform.call(this); }
var ReplaceStream = function(searchString,replaceString){ stream.Transform.call(this,{decodeStrings:false}); this.searchString = searchString; this.replaceString = replaceString; this.tailPiece = ''; }
function Receiver(options) { // init Transform stream.Transform.call(this, options); }