Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
let
maxDifference = TestUtil.bitmapMaxDifference(fusion, pngImage),
chickenPaintPNG = new PNG({
width: this.width,
height: this.height
});
console.log(chiName + " max difference " + maxDifference);
failures++;
chickenPaintPNG.data.set(fusion.data);
// fs.writeFileSync(filenameRoot + ".chickenpaint.raw", chickenPaintPNG.data, { defaultEncoding: null });
pipe(chickenPaintPNG.pack(), fs.createWriteStream(filenameRoot + ".chickenpaint.png", {defaultEncoding: null}), (err) => {
if (err) {
reject(err);
} else {
resolve();
}
});
}
});
}));
return new Promise((resolve, reject) => {
pipe(...streams, err =>
err ? reject(err) : resolve())
.resume() // Drain.
})
}
return function(){
return pipeline.apply(pipeline, args);
};
};
return function(){
return pipeline.apply(pipeline, args);
};
};
return function(){
return pipeline.apply(pipeline, args);
};
};
return function(){
return pipeline.apply(pipeline, args);
};
};
function pipe() {
return multipipe.apply(null, arguments)
.on('data', function() {});
}
return function(){
return pipeline.apply(pipeline, args);
};
};
return function(){
return pipeline.apply(pipeline, args);
};
};