Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
currentObjectsToBlob: function () {
var startpoint = this.selectStartPoint
var endpoint = this.selectEndPoint
if (startpoint > endpoint) { startpoint = this.selectEndPoint; endpoint = this.selectStartPoint }
const format = this.selectedFormat()
// if output format is jscad or js , use that, otherwise use currentObjects
const objects = (format === 'jscad' || format === 'js') ? this.script : this.currentObjects.slice(startpoint, endpoint + 1)
return convertToBlob(prepareOutput(objects, {format}))
},
.then(function (objects) {
// Buffer.from(outputData.data),{encoding: outputData.mimeType},
return convertToBlob(prepareOutput(objects, {format: outputFormat}))
})