JSPM

merge-files

0.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4187
  • Score
    100M100P100Q119233F
  • License ISC

Combine multiple files into one file in order based on multistream. It's a promise version that applies to merging large files that taking long time.

Package Exports

  • merge-files

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (merge-files) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

merge-files

Combine multiple files into one file in order based on multistream. It's a promise version that applies to merging large files that taking long time.

Install

npm i merge-files

Usage

import mergeFiles from 'merge-files';

const outputPath = __dirname + '/result.txt';

const inputPathList = [
    __dirname + '/1.txt',
    __dirname + '/2.txt',
    __dirname + '/3.txt'
];

// status: true or false
const status = await mergeFiles(inputPathList, outputPath);
// or
mergeFiles(inputPathList, outputPath).then((status) => {
    // next
});