0.8.5 • Published 4 years ago

dir-file-merger v0.8.5

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

npm directory-file-merger

node.js module for merging files from directory. It takes all files from a specific folder and merges their contents into one result file.

Installing

npm install dir-file-fileMerger

Usage

const fileMerger = require('./app.js');
let inputDirPath = './dir/';
let resultFile = 'result.txt';
(async() => {
    let result;
    try {
      let result = await fileMerger('inputDirPath, resultFile);
    } catch (error) {
      return console.log(error);
    }
    console.log(result);
})();

Optionally you can provide 3rd parameter wich should be a string. This line will be appended to the end of each input file.

...
      let result = await fileMerger('inputDirPath, resultFile,'\n');
...
0.8.5

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago