Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
callback(err, data);
});
}
if (data.sourceType === 'buffer') {
append(null, source);
} else if (data.sourceType === 'stream' && data.stats) {
data.size = data.stats.size;
var entry = self.engine.entry(data, function(err) {
callback(err, data);
});
source.pipe(entry);
} else if (data.sourceType === 'stream') {
util.collectStream(source, append);
}
};
callback(err);
return;
}
data.size = sourceBuffer.length || 0;
data.crc32 = crc32.unsigned(sourceBuffer);
self.files.push(data);
callback(null, data);
}
if (data.sourceType === 'buffer') {
onend(null, source);
} else if (data.sourceType === 'stream') {
util.collectStream(source, onend);
}
};