showing results for - "process stdin on 28 27data 27"
Benjamin
16 Jan 2019
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
Lina
21 Apr 2019
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});