📜  process.stdin.on("数据", function (input) { _input += input; }); - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:25.689000             🧑  作者: Mango

代码示例1
function main (input) {
 input.split ("\n").forEach (function (n){
     console.log (n);
});
}
process.stdin.resume ();
process.stdin.setEncoding ("utf-8")
process.stdin.on ("data", function (input){
        stdin_input += input;
});
process.stdin.on ("end", function (){
      main (stdin_input);
});