0.0.1 • Published 8 years ago

file-mergery v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

File merger

Simple file merger that combines a set of files into a single file.

The list of files can either be passed in explicity in an array or as a file system glob with an optional sort function.

Installation

npm install --save file-mergery

Usage

var fm = require('file-mergery')

const config = {
  fileList: ['file1.txt', 'file2.txt'],
  mergedFilePath: 'completeFile.txt'
};

const config2 = {
  fileGlob: '*.mp4*',
  sort: fm.sortByPostfixNumber,
  mergedFilePath: 'completeVideo.mp4'
};

fm.mergeFiles(config)
  .then(() => {
    // Do something with merged file
  })

fm.mergeFiles(config2)
  .then(() => {
    // Do something with merged file
  })

Testing

npm test