Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toPNG(filepath, callback) {
if (this.svg) {
const svgFile = this.save(filepath);
const filename = filepath.replace(/\.dot$/, ".png");
svgexport.render([{
input: [svgFile],
output: [filename]
}], function(){
callback(filename);
});
}
return "error.";
}