Module workflow_wasm::utils
source · Expand description
Utilities for calling JavaScript functions and retrieving values from JavaScript object properties.
Functions§
- Call a JavaScript function without arguments
- Call a JavaScript function with a single argument
- Call a JavaScript function with two arguments
- Obtain a
bool
value from the object propertyprop
- Obtain
f64
value from an object property. Results in anError
if the value is not a number. - Obtain a JsValue from a JavaScript object property. Results in an
Error
if the property does not exist. - Obtain a
String
value from the object propertyprop
- Obtain
u8
value from the object propertyprop
. Results in anError
if the value is not a number or the number value is out of bounds (0..u8::MAX). - Obtain
u16
value from the object propertyprop
. Results in anError
if the value is not a number or the number value is out of bounds (0..u16::MAX). - Obtain
u32
value from the object propertyprop
. - Obtain a
u64
value from an object property. Results in anError
if the value is not a number, roundedu64
if the value is a number. - Obtain
Vec<JsValue>
by treating the object propertyprop
as an array - Obtain
Vec<u8>
from the supplied big number - Obtain a
Vec<u8>
from the propertyprop
expressed as a big number - Obtain a
Vec<u8>
value from the object propertyprop
(usingUint8Array
) - Obtain a
Vec<u8>
value from the object propertyprop
(usingUint8Array
)