1.0.4 • Published 2 years ago

fs-reader v1.0.4

Weekly downloads
1
License
ISC
Repository
gitlab
Last release
2 years ago

fs-reader

Reads whole file, or just tail or head, only as needed (won't explode RAM)

const reader = require('fs-reader');
//...
const file = '/test.txt';
const lines = 100;
reader(file, lines, function(err, contents){
    if(err) throw err;
    console.log(contents);
});

file: path to the file to read. Can be absolute or relative (from __dirname)

lines: Positive line number means head, negative means tail, 0 or null means whole.

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

6 years ago

1.0.1

8 years ago

1.0.0

8 years ago