writable-stream-stack
Make a node stream pipeline. New transforms can be pushed to apply before the data reaches the dest stream
Usage
var Stack = ;
ws = Stack(dest)
ws = Stack(tr1, tr2,..., dest)
ws = Stack([tr1, tr2,..., dest])
ws
is a Writable
stream, and each chunk written in will reach the writable dest
, before handled by the transform pipeline tr1, tr2,...
ws.on('done', cb)
ws
fires done
after dest
has finished.
ws.push(tr)
Add transform tr
to the very beginning of the pipeline.
ws.pop()
Delete the first transform from the pipeline.
Example
var fs = ;var vfs = ;var path = ;var Stack = ;var source = ; var DEST = path;var dest = fs ; dest; { return ;}
a.js:
module { console;};
output:
module.exports = function () {
console.log('a');
};