Skip to content

Instantly share code, notes, and snippets.

@htor

htor/lower.js

Created Jun 20, 2018
Embed
What would you like to do?
node transform stream
const { Transform } = require('stream')
const ts = Transform({ decodeStrings: false })
ts._write = (chunk, enc, next) => {
ts.push(chunk.toUpperCase())
next()
}
process.stdin.setEncoding('utf8')
process.stdin.pipe(ts).pipe(process.stdout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.