Urara-Blog/node_modules/.pnpm-store/v3/files/a8/e7b8795fdffd66fa98e6edd49c5e80f3d7dd10a80e5fecd294e9e860e0727dc452de35ba2c8f51513ca635cf1dff2587d53e56c6c46b69319c0417846c6271
2022-08-14 01:14:53 +08:00

22 lines
637 B
Text

"use strict";
let mappingsWasm = null;
module.exports = function readWasm() {
if (typeof mappingsWasm === "string") {
return fetch(mappingsWasm)
.then(response => response.arrayBuffer());
}
if (mappingsWasm instanceof ArrayBuffer) {
return Promise.resolve(mappingsWasm);
}
throw new Error("You must provide the string URL or ArrayBuffer contents " +
"of lib/mappings.wasm by calling " +
"SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) " +
"before using SourceMapConsumer");
};
module.exports.initialize = input => {
mappingsWasm = input;
};