Created
August 8, 2014 16:59
-
-
Save dlmanning/f05d9bf1c79f72ae1092 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var { Transform } = require('stream'); // use require for non-ES6 Node modules | |
class MyStream extends Transform { | |
constructor (options) { | |
super({ | |
lowWaterMark: 0, | |
encoding: 'utf8' | |
}); | |
} | |
_transform(chunk, encoding, cb) { | |
this.push(String(chunk).toUpperCase()); | |
cb(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment