read-each-line-sync

1.0.5 • Public • Published

read-each-line-sync

Read file line by line, synchronously.

Install

npm install read-each-line-sync

Example

var readEachLineSync = require('read-each-line-sync')
 
readEachLineSync('test.txt', 'utf8', function(line) {
  console.log(line)
})

Encoding can optionally be omitted, in which case it will default to utf8:

readEachLineSync('test.txt', function(line) {
  console.log(line)
})

End-Of-Line can be specified along with encoding if necessary, otherwise it defaults to your operating system EOF:

readEachLineSync('test.txt', 'utf-8', '\n', function(line) {
  console.log(line)
})

Credits

Author: Geza Kovacs

Based on readLineSync

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.5142latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.5142
1.0.40
1.0.31
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i read-each-line-sync

Weekly Downloads

143

Version

1.0.5

License

MIT

Last publish

Collaborators

  • geza