1process.stdin.resume();
2process.stdin.on("data", function(data) {
3 console.log("recieved " + data)
4})
5
6process.stdin.write("foo\n")
7process.stdin.write("bar\n")
8
1function main (input) {
2 input.split ("\n").forEach (function (n){
3 console.log (n);
4});
5}
6process.stdin.resume ();
7process.stdin.setEncoding ("utf-8")
8process.stdin.on ("data", function (input){
9 stdin_input += input;
10});
11process.stdin.on ("end", function (){
12 main (stdin_input);
13});