{"size": 1256, "ext": "js", "max_stars_repo_path": "src/index.js", "max_stars_repo_name": "garbetjie/apng-assembler", "max_stars_repo_stars_event_min_datetime": "2017-12-27T10:02:36.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-24T02:44:42.000Z", "max_issues_repo_path": "src/index.js", "max_issues_repo_name": "garbetjie/apng-assembler", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/index.js", "max_forks_repo_name": "garbetjie/apng-assembler", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 5, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.9459459459, "max_line_length": 120, "alphanum_fraction": 0.7507961783}
const AssemblerModule = require('./assembler');

// Export the assembler.
module.exports.Assembler = AssemblerModule.Assembler;
module.exports.COMPRESS_7ZIP = AssemblerModule.COMPRESS_7ZIP;
module.exports.COMPRESS_ZOPFLI = AssemblerModule.COMPRESS_ZOPFLI;
module.exports.COMPRESS_ZLIB = AssemblerModule.COMPRESS_ZLIB;


/**
 * Assemble the given input files into an animated PNG synchronously.
 *
 * @param {String} inputFiles
 * @param {String} outputFile
 * @param {Object} [options]
 */
module.exports.assembleSync = function (inputFiles, outputFile /*, options*/) {
    let options = arguments[2] || {};
    let assembler = new AssemblerModule.Assembler(options.loopCount, options.frameDelay, options.compression);

    assembler.assembleSync(inputFiles, outputFile);
};


/**
 * Assemble the given input files into an animated PNG asynchronously. Returns a Promise that is resolved when complete.
 *
 * @param inputFiles
 * @param outputFile
 * @return {Promise}
 */
module.exports.assemble = function (inputFiles, outputFile /*, options */) {
    let options = arguments[2] || {};
    let assembler = new AssemblerModule.Assembler(options.loopCount, options.frameDelay, options.compression);

    return assembler.assemble(inputFiles, outputFile);
};