0.3.2 • Published 2 years ago

readlinesyn v0.3.2

Weekly downloads
26
License
-
Repository
github
Last release
2 years ago

readlinesyn

Reading a text file line by line in synchrony mode.

Methods

  • open( filePath )
  • close()
  • next()
  • isEOF()

Installation

readlinesyn requires Node.js v4+ to run.

$ npm install readlinesyn

Example

const LineByLine = require('readlinesyn'); 
 
var filename = './result.txt';
var liner = new LineByLine();

var theline; 
// the default encode is 'utf8'
// liner._encode = "utf8";
liner.open( filename ); 

while( !liner.isEOF() )
{
   theline = liner.next();
   console.log( 'READ LINE: ' + theline );
}
 
liner.close(); 
0.3.2

2 years ago

0.3.0

4 years ago

0.3.1

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago