Last active
October 26, 2017 22:38
-
-
Save joefromct/b28bc124038c44a160adad463c98736e 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
var readline = require('readline'); | |
var rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false | |
}); | |
rl.on('line', function (line) { | |
console.log(line.length); | |
}); | |
/* | |
(nodejs/enable-util-print!) | |
(defn -main [& args] | |
(let [ | |
readline (nodejs/require "readline") | |
rl (.createInterface readline #js { "input" (.-stdin js/process) | |
"output" (.-stdout js/process) | |
"terminal" false})] | |
(.on rl "line", #(println (count %))))) | |
(set! *main-cli-fn* -main) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment