30 lines
827 B
JavaScript
30 lines
827 B
JavaScript
import * as wasm from './meli_bg.wasm';
|
|
|
|
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
|
|
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
|
|
cachedTextDecoder.decode();
|
|
|
|
let cachegetUint8Memory0 = null;
|
|
function getUint8Memory0() {
|
|
if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) {
|
|
cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
}
|
|
return cachegetUint8Memory0;
|
|
}
|
|
|
|
function getStringFromWasm0(ptr, len) {
|
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
}
|
|
/**
|
|
*/
|
|
export function greet() {
|
|
wasm.greet();
|
|
}
|
|
|
|
export const __wbg_alert_f54825e3fcb98a51 = function(arg0, arg1) {
|
|
alert(getStringFromWasm0(arg0, arg1));
|
|
};
|
|
|