Node.js allows us to read and read a file line by line at any step as per need. Reading the whole file at once will make the process memory intensive. In this post we will look into 3 ways to read a readline with a readable stream. N-readlines NPM is a NPM module that will read file lines by line without buffering the entire
Table of contents
Table of contents #Prerequisites #The test file #Read file sync #Readline #N-readlines #Line reader #Other options #Quick comparison #Conclusion #Sort: