Node Delete Partial
An easy and simple to use Node module to efficiently remove the first X number of lines from an inputstream. It uses streams, which means it doesn't need to load whole files in memory, so it is way more efficient and fast, as well can work on very large files without filling memory on the hardware.
Learn more about the installation and how to use this package in the updated documentation page.
Type in the following to the command line to install the dependency.
$ npm install --save node-delete-partial
$ yarn add node-delete-partial
🎉 Large File Usage Example
var deletePartialStream = ;var fs = ;var input = fs;var output = fs;input// delete 5 lines from beginning of file;
🎉 Small File Usage Example
var deletePartials = ;var filePath = process + '/file.txt';;
|lines||number||NO||Delete the number of lines from the beginning of the file. Default is
deletePartials(path[, options], callback)
|path||string||YES||File to delete from and update.|
|callback||Function||NO||The callback gets one argument
Valid options keys are:
- "lines" (number) - Delete the number of lines from the beginning of the file. Default is
Free and made possible along with costly maintenance and updates by Lue Hang (the author).
Pull requests are welcomed.
Contributors will be posted here.
Not sure where to start, or a beginner? Take a look at the issues page.
MIT © Lue Hang, as found in the LICENSE file.