All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.jszip.lib.stream.ConvertWorker.js Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
'use strict';

var GenericWorker = require('./GenericWorker');
var utils = require('../utils');

/**
 * A worker which convert chunks to a specified type.
 * @constructor
 * @param {String} destType the destination type.
 */
function ConvertWorker(destType) {
    GenericWorker.call(this, "ConvertWorker to " + destType);
    this.destType = destType;
}

utils.inherits(ConvertWorker, GenericWorker);

/**
 * @see GenericWorker.processChunk
 */
ConvertWorker.prototype.processChunk = function (chunk) {
    this.push({
        data: utils.transformTo(this.destType, chunk.data),
        meta: chunk.meta
    });
};
module.exports = ConvertWorker;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy