fs-reader

reads whole file, or just tail or head, only as needed.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
fs-reader
1.0.42 years ago8 years agoMinified + gzip package size for fs-reader in KB

Readme

fs-reader
Reads whole file, or just tail or head, only as needed (won't explode RAM) ```js 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.