peek
Fetches a single value from memory. The heap view used for reading the memory is specified by the second argument, defaulting to byte-oriented view.
If the 2nd argument ends with "*" then the pointer-sized representation is always used (currently always 32 bits).
Example:
let i32 = wasm.peek(myPtr, 'i32');Content copied to clipboard
abstract fun peek(addresses: ReadonlyArray<WasmPointer>, representation: JsString): ReadonlyArray<JsAny>(source)
The second form fetches the value from each pointer in the given array and returns the array of values. The heap view used for reading the memory is specified by the second argument, defaulting to byte-oriented view.
If the 2nd argument ends with "*" then the pointer-sized representation is always used (currently always 32 bits).