FLUJOS/VISUALIZACION/node_modules/parcel-bundler/lib/builtins/loaders/wasm-loader.js
2025-11-07 00:06:12 +01:00

16 lines
449 B
JavaScript
Executable file

module.exports = function loadWASMBundle(bundle) {
return fetch(bundle)
.then(function (res) {
if (WebAssembly.instantiateStreaming) {
return WebAssembly.instantiateStreaming(res);
} else {
return res.arrayBuffer()
.then(function (data) {
return WebAssembly.instantiate(data);
});
}
})
.then(function (wasmModule) {
return wasmModule.instance.exports;
});
};