Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var whiteBGContext = whiteBG.getContext('2d')
whiteBGContext.fillStyle = 'white'
whiteBGContext.fillRect(0, 0, whiteBG.width, whiteBG.height)
children = [{
"id": 1,
"name": "Background",
"canvas": whiteBG
}].concat(children)
let psd = {
width: psdWidth,
height: psdHeight,
imageResources: {layerSelectionIds: [3] },
children: children
};
const buffer = writePsd(psd)
fs.writeFileSync(psdPath, buffer)
fulfill()
})
.catch(error => {