WebAssembly module wrapper.
var Module = require( '@stdlib/wasm/module-wrapper' );Returns a new WebAssembly module wrapper instance.
// TO-DO: exampleThe function accepts the following arguments:
- binary: WebAssembly binary code.
- memory: WebAssembly memory instance.
- imports: WebAssembly module imports object.
Read-only property which returns a WebAssembly memory buffer as a Uint8Array.
// TO-DO: exampleReturns a boolean indicating whether a provided list of values is a view of the underlying memory of the WebAssembly module.
// TO-DO: examplevar hasWebAssemblySupport = require( '@stdlib/assert/has-wasm-support' );
var Module = require( '@stdlib/wasm/module-wrapper' );
function main() {
if ( !hasWebAssemblySupport() ) {
console.error( 'Environment does not support WebAssembly.' );
return;
}
console.log( typeof Module ); // TO-DO: write example
}
main();