| 82 | /// console.log(credits_functions === expected_functions); // Output should be "true" |
| 83 | #[wasm_bindgen(js_name = "getFunctions")] |
| 84 | pub fn get_functions(&self) -> Array { |
| 85 | let array = Array::new_with_length(self.0.functions().len() as u32); |
| 86 | let mut index = 0u32; |
| 87 | self.0.functions().values().for_each(|function| { |
| 88 | array.set(index, JsValue::from_str(&function.name().to_string())); |
| 89 | index += 1; |
| 90 | }); |
| 91 | array |
| 92 | } |
| 93 | |
| 94 | /// Get a javascript object representation of the function inputs and types. This can be used |
| 95 | /// to generate a web form to capture user inputs for an execution of a function. |