How to use the @jscad/io.makeBlob function in @jscad/io

To help you get started, we’ve selected a few @jscad/io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jscad / OpenJSCAD.org / packages / core / io / convertToBlob.js View on Github external
const { makeBlob } = require('@jscad/io')

const Blob = makeBlob()

function convertToBlob (input) {
  const {data, mimeType} = input
  const blob = new Blob(data, { type: mimeType })
  return blob
}

module.exports = {
  convertToBlob
}