Package Exports
- wasm-feature-detect
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wasm-feature-detect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
WebAssembly Feature Detection
A small library (700B gzip’d) to detect which features of WebAssembly are supported in your current browser.
Installation
npm install -g wasm-feature-detectUsage
<script type="module">
import { simd } from "https://unpkg.com/wasm-feature-detect?module";
simd().then(simdSupported => {
if (simdSupported) {
/* SIMD support */
} else {
/* No SIMD support */
}
});
</script>If required, there’s also a UMD version
<script src="https://unpkg.com/wasm-feature-detect/dist/umd/index.js"></script>
<script>
wasmFeatureDetect.simd().then(/* same as above */);
</script>Detectors
All detectors return a Promise<bool>.
| Function | Proposal |
|---|---|
bulkMemory() |
Bulk memory operations |
exceptions() |
Exception handling |
multiValue() |
Multi-value |
mutableGlobals() |
Importable/Exportable mutable globals |
referenceTypes() |
Reference Types |
saturatedFloatToInt() |
Non-trapping float-to-int conversions |
signExtensions() |
Sign-extension operators |
simd() |
Fixed-Width SIMD |
tailCall() |
Tail call |
threads() |
Threads |
License Apache-2.0