Created
March 10, 2014 22:13
-
-
Save venil7/9475591 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
process.stdin.setEncoding('utf8'); | |
// becomes readable on every [enter] keystroke | |
process.stdin.on('readable', function(chunk) { | |
var chunk = process.stdin.read(); | |
if (chunk !== null) { | |
console.log(chunk | |
.split('') | |
.map(function(c) { | |
return String.fromCharCode(c.charCodeAt(0)-1); | |
}).join('')); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment