Skip to content

Commit

Permalink
docs: fix typos in wasm mjs example (nodejs#7333)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley2058 authored Dec 19, 2024
1 parent 23508d5 commit 169cbdc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ WebAssembly.instantiate(wasmBuffer).then(wasmModule => {
import fs from 'node:fs/promises';

// Use readFile to read contents of the "add.wasm" file
const wasmBuffer = await fs.readFile('path/to/add.wsm');
const wasmBuffer = await fs.readFile('/path/to/add.wasm');

// Use the WebAssembly.instantiate method to instantiate the WebAssembly module
const wasmModule = await WebAssembly.instantiate(wasmBuffer);
Expand All @@ -76,7 +76,7 @@ const { add } = wasmModule.instance.exports;

const sum = add(5, 6);

console.log(sum); // Outputs 11
console.log(sum); // Outputs: 11
```

## Interacting with the OS
Expand Down

0 comments on commit 169cbdc

Please sign in to comment.