ulmo-transform
v0.1.0
Published
functional wrapper to create Transform stream
Downloads
3
Readme
ulmo-transform
Create Transform streams using a functional wrapper API.
const read = require("fs").createReadStream;
const transform = require("ulmo-transform");
// read file.txt and split stream on newlines
read("file.txt", {encoding: "utf8"})
.pipe(transform(function(chunk, done) {
chunk.split(/(\n)/g).forEach(token => this.push(token));
done();
}));