Sha256: 9ebff5bca3e6c8cc996ac99139e6c0d29099da2ea49726d4d8eb7183154bfaa1

Contents?: true

Size: 288 Bytes

Versions: 73

Compression:

Stored size: 288 Bytes

Contents

function blobToFile(blob, fileName, type) {
  return new File([blob], fileName, { type });
}

function fileToDataURL(file, cb) {
  const reader = new FileReader();
  reader.onload = ({ target }) => cb(target.result);
  reader.readAsDataURL(file);
}

export { fileToDataURL, blobToFile };

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
coveragebook_components-0.8.4 app/assets/js/helpers/file.js
coveragebook_components-0.8.3 app/assets/js/helpers/file.js
coveragebook_components-0.8.2 app/assets/js/helpers/file.js
coveragebook_components-0.8.1 app/assets/js/helpers/file.js
coveragebook_components-0.8.0 app/assets/js/helpers/file.js
coveragebook_components-0.8.0.beta.3 app/assets/js/helpers/file.js
coveragebook_components-0.8.0.beta.2 app/assets/js/helpers/file.js
coveragebook_components-0.8.0.beta.1 app/assets/js/helpers/file.js
coveragebook_components-0.7.10 app/assets/js/helpers/file.js
coveragebook_components-0.7.9 app/assets/js/helpers/file.js
coveragebook_components-0.7.8 app/assets/js/helpers/file.js
coveragebook_components-0.7.7 app/assets/js/helpers/file.js
coveragebook_components-0.7.6 app/assets/js/helpers/file.js
coveragebook_components-0.7.5 app/assets/js/helpers/file.js
coveragebook_components-0.7.4 app/assets/js/helpers/file.js
coveragebook_components-0.7.3 app/assets/js/helpers/file.js
coveragebook_components-0.7.2 app/assets/js/helpers/file.js
coveragebook_components-0.7.1 app/assets/js/helpers/file.js
coveragebook_components-0.7.0 app/assets/js/helpers/file.js
coveragebook_components-0.6.5 app/assets/js/helpers/file.js