line-reader-sync

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i line-reader-sync

Weekly Downloads

6,109

Version

0.1.0

License

MIT

Last publish

Collaborators

  • nstal