Created
August 31, 2015 04:53
-
-
Save kyungw00k/2cd769393242fc3cac04 to your computer and use it in GitHub Desktop.
Read line by line in NodeJS
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
require('fs') | |
.readFileSync(process.argv[2]) | |
.toString() | |
.split(/\r?\n/) | |
.forEach(function (line) { | |
/* do somthing */ | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment