jsObjectToMap function
Implementation
Map? jsObjectToMap(JsObject? o) {
if (o == null) return null;
var keys = jsObjectKeys(o);
if (keys.isEmpty) return {};
return Map.fromEntries(keys.map((k) {
var v = o[k];
return MapEntry(k, jsToDart(v));
}));
}