Last active
April 16, 2018 03:25
-
-
Save jsdevtom/d98dd218b9d7948d33418ca8ef5f735c to your computer and use it in GitHub Desktop.
A simple implementation of a node.js transformer class in ES6.
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
const {Transform} = require('stream') | |
class UpperCase extends Transform { | |
_transform (chunk, encoding, done) { | |
done(null, chunk.toString().toUpperCase()) | |
} | |
} | |
module.exports = UpperCase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment