(obj: &Object)
| 163 | } |
| 164 | |
| 165 | pub fn object_entries(obj: &Object) -> impl Iterator<Item = Result<(JsValue, JsValue), JsValue>> { |
| 166 | Object::entries(obj).values().into_iter().map(|pair| { |
| 167 | pair.map(|pair| { |
| 168 | let key = Reflect::get(&pair, &"0".into()).unwrap(); |
| 169 | let val = Reflect::get(&pair, &"1".into()).unwrap(); |
| 170 | (key, val) |
| 171 | }) |
| 172 | }) |
| 173 | } |
| 174 | |
| 175 | pub fn pyresult_to_js_result(vm: &VirtualMachine, result: PyResult) -> Result<JsValue, JsValue> { |
| 176 | result |
no test coverage detected