Created
August 10, 2012 04:11
-
-
Save mironal/3310996 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 inputText = ""; | |
process.stdin.on('data', function(chunk){ | |
// 入力されてきた文字列をひたすら連結 | |
inputText += chunk; | |
}); | |
// ストリーム終了時に呼ばれる. | |
process.stdin.on('end', function(){ | |
inputText.split('\n').forEach(function(){ | |
// なんか処理する | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment