Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_defaultProjects[title].forEach(function(file) {
switch(dataType) {
case TAR_STREAM:
result.entry({ name: file.path }, file.buffer);
break;
case FILE_STREAM:
result.push({
path: file.path,
stream: MemoryStream.createReadStream(file.buffer),
size: file.buffer.length
});
break;
case BUFFER:
default:
result.push(file);
break;
}
});