0.1.0 • Published 8 years ago

ulmo-transform v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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();
    }));
0.1.0

8 years ago