0.1.0 • Published 8 years ago

line-reader-sync v0.1.0

Weekly downloads
266
License
MIT
Repository
github
Last release
8 years ago

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"...]