Skip to content
An sync version of nodejs line reader
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
node_modules/bigbuffer
test
.gitignore
LICENSE
README.md
index.js
package.json

README.md

node-line-reader-sync

An sync version of nodejs line reader Only support \n nor \r\n currently.

LineReaderSync = require("line-reader-sync")
lrs = new LineReaderSync("path")
while(true){
  var line = lrs.readline()
  if(line === null){
    console.log("EOF");
  }else{
    console.log("line without \n",line)
  }

}
//or
lrs.toLines()
//["line1","line2"...]
Something went wrong with that request. Please try again.