Created
December 1, 2016 08:30
-
-
Save afaur/2912036d206d2ececc704ef9086b0a62 to your computer and use it in GitHub Desktop.
Filter vim using `!` for example `!!node filter_vim.js` will remove the vowels of the current line.
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
process.stdin.setEncoding('utf8') | |
var chunks = [] | |
process.stdin.on('readable', function () { | |
var chunk = process.stdin.read() | |
chunks.push(chunk) | |
}) | |
process.stdin.on('end', function () { | |
var input = chunks.join('') | |
var output = input.replace(/[aeiou]+/g, '') | |
process.stdout.write(output) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment