Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
case 'stl':
const deserializeStl = require('@jscad/io').stlDeSerializer.deserialize
r.source = r.converted = deserializeStl(data.source, data.filename, options)
break
case 'js':
r.source = r.converted = data.source
break
case 'jscad':
r.source = r.converted = data.source
break
case 'svg':
const deserializeSvg = require('@jscad/io').svgDeSerializer.deserialize
r.source = r.converted = deserializeSvg(data.source, data.filename, options)
break
case 'json':
const deserializeJson = require('@jscad/io').jsonDeSerializer.deserialize
r.source = r.converted = deserializeJson(data.source, data.filename, options)
break
default:
r.source = r.converted = '// Invalid file type in conversion (' + e + ')'
break
}
}
}
}
postMessage(r)
}
}
json: data => require('@jscad/io').jsonDeSerializer.deserialize(data.source, data.inputFile, options),
jscad: data => data.source,