UNPKG
@tybys/wasm-util
Version:
latest (0.10.1)
0.10.1
0.10.0
0.9.0
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.0
0.5.3
0.5.2
0.5.1
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
WASI polyfill for browser and some wasm util
github.com/toyobayashi/wasm-util
toyobayashi/wasm-util
@tybys/wasm-util
/
lib
/
mjs
/
webassembly.mjs
10 lines
(9 loc)
•
283 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
const
_WebAssembly =
typeof
WebAssembly
!==
'undefined'
?
WebAssembly
:
typeof
WXWebAssembly
!==
'undefined'
?
WXWebAssembly
:
undefined
;
if
(!_WebAssembly) {
throw
new
Error
(
'WebAssembly is not supported in this environment'
); }
export
{ _WebAssembly };