Skip to content

Instantly share code, notes, and snippets.

@htor
Created June 20, 2018 12:58
Show Gist options
  • Select an option

  • Save htor/5802b54dd9187515f04bb2aa35f17ee4 to your computer and use it in GitHub Desktop.

Select an option

Save htor/5802b54dd9187515f04bb2aa35f17ee4 to your computer and use it in GitHub Desktop.

Revisions

  1. htor created this gist Jun 20, 2018.
    9 changes: 9 additions & 0 deletions lower.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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)