"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayBufferToBlobUrl = void 0;
/**
* Create an object URL from an array buffer.
*
* @param buffer The array buffer
* @param type MIME type
* @returns The object URL
* @category arrayBuffer
* @module arrayBufferToBlobUrl
*/
function arrayBufferToBlobUrl(buffer, type) {
var bytes = new Uint8Array(buffer);
var blob = new Blob([bytes], { type: type });
return window.URL.createObjectURL(blob);
}
exports.arrayBufferToBlobUrl = arrayBufferToBlobUrl;
exports.default = arrayBufferToBlobUrl;
Source