# wasm-check

> TypeScript / JavaScript library for detect WebAssembly features in node.js & browser

Latest version **3.0.2** (published 2026-04-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install wasm-check
pnpm add wasm-check
yarn add wasm-check
bun add wasm-check
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2026-04-21 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 20 |
| Dependencies | 0 |
| Unpacked size | 26.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | MaxGraey @ 2021 |
| Maintainers | maxgraey |
| Keywords | wasm, webassembly, feature, validate, check, support, test, detect |

## Links

- npm: https://www.npmjs.com/package/wasm-check
- Repository: https://github.com/MaxGraey/wasm-check
- Homepage: https://github.com/MaxGraey/wasm-check#readme
- Issues: https://github.com/MaxGraey/wasm-check/issues
- npm.io page: https://npm.io/package/wasm-check

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 3.0.2 (latest) — 2026-04-21
- 3.0.1 — 2026-04-21
- 3.0.0 — 2026-04-21
- 2.1.2 — 2022-07-20
- 2.1.1 — 2022-07-17
- 2.1.0 — 2022-06-07
- 2.0.4 — 2022-05-11
- 2.0.3 — 2021-06-07
- 2.0.2 — 2021-03-30
- 2.0.1 — 2020-12-02
- 2.0.0 — 2020-09-14
- 1.5.7 — 2020-07-27
- 1.5.6 — 2020-07-27
- 1.5.5 — 2020-07-27
- 1.5.4 — 2020-07-12
- … 37 more at https://npm.io/package/wasm-check/versions

## README

[![NPM registry](https://img.shields.io/npm/v/wasm-check.svg?style=for-the-badge)](https://www.npmjs.com/package/wasm-check)[![NPM license](https://img.shields.io/badge/license-mit-green.svg?style=for-the-badge)](LICENSE.md)

Detect WebAssembly Features
---

A tiny, zero-dependency library for detecting WebAssembly features (**~2 kB minified**).

## Support features

- [x] [Reference types](https://github.com/WebAssembly/reference-types) _(standardized)_
- [x] [BigInt between js and wasm](https://github.com/WebAssembly/JS-BigInt-integration) _(standardized)_
- [x] [Bulk memory operations](https://github.com/webassembly/bulk-memory-operations) _(standardized)_
- [x] [Exceptions](https://github.com/WebAssembly/exception-handling) _(--experimental-wasm-eh)_
- [x] [Memory 64-bit](https://github.com/WebAssembly/memory64) _(--experimental-wasm-memory64)_
- [x] [Custom page sizes](https://github.com/WebAssembly/custom-page-sizes)
- [x] [Mutable globals](https://github.com/WebAssembly/mutable-global) _(standardized)_
- [x] [Multi values](https://github.com/WebAssembly/multi-value) _(standardized)_
- [x] [Saturated (non-trapping) conversions from float to int](https://github.com/WebAssembly/nontrapping-float-to-int-conversions) _(standardized)_
- [x] [Sign extensions](https://github.com/WebAssembly/sign-extension-ops) _(standardized)_
- [x] [Tail calls](https://github.com/webassembly/tail-call) _(--experimental-wasm-return-call)_
- [x] [Threads](https://github.com/webassembly/threads) _(standardized)_
- [x] [SIMD](https://github.com/webassembly/simd) _(standardized)_
- [x] [Relaxed SIMD](https://github.com/WebAssembly/relaxed-simd)
- [x] [GC](https://github.com/WebAssembly/gc)
- [x] [Type reflection](https://github.com/WebAssembly/js-types) _(--experimental-wasm-type-reflection)_
- [x] [Typed function references](https://github.com/WebAssembly/function-references)
- [x] [JS String builtins](https://github.com/WebAssembly/js-string-builtins)

## Install

```
yarn add wasm-check
```

or

```
npm i wasm-check
```

## Usage

#### Check supported WebAssembly version

```ts
import * as check from 'wasm-check';
// or
// const check = require('wasm-check');

console.log(check.support());  // WebAssembly >= 1.0
console.log(check.support(1)); // ^^^
console.log(check.support(2)); // WebAssembly >= 2.0
console.log(check.support(3)); // WebAssembly >= 3.0
```

#### Check supporting streaming compilation

```ts
import * as check from 'wasm-check';

console.log(check.supportStreaming);
```

#### Get all post-MVP WebAssembly features

```ts
import * as check from 'wasm-check';

const features = { ...check.feature };
console.log(features);
```

Output:

```js
{
  bigInt: true,
  bulk: true,
  exceptions: true,
  memory64: true,
  customPageSizes: false,
  mutableGlobal: true,
  multiValue: true,
  saturateConversions: true,
  signExtensions: true,
  tailCall: true,
  threads: true,
  simd: true,
  relaxedSimd: true,
  gc: true,
  references: true,
  typeReflection: false,
  funcReferences: true,
  jsStringBuiltins: true
}
```

#### Or check concrete feature

```ts
import * as check from 'wasm-check';

console.log(check.feature.simd); // has SIMD support?
console.log(check.feature.relaxedSimd); // has Relaxed SIMD support?
console.log(check.feature.tailCall); // has tail call support?
console.log(check.feature.gc); // has Wasm GC support?
console.log(check.feature.jsStringBuiltins); // has JS String builtins support?
```

---
_Source: https://npm.io/package/wasm-check · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
