UNPKG

amos-tool

Version:

amos ui tool

19 lines (17 loc) 413 B
"use strict"; var getArrayBuffer = function(e) { for (var r = e.length, t = new ArrayBuffer(r), i = new Uint8Array(t); r--; ) i[r] = e.charCodeAt(r); return t; }, getFileBlob = function(e) { return new Blob([ getArrayBuffer() ], { type: e }); }, mimeType = { pdf: "application/pdf", png: "image/png", jpeg: "image/jpeg" }; module.exports = { getFileBlob: getFileBlob, mimeType: mimeType };