jsToMap function

Map jsToMap(
  1. dynamic jsObject
)

A workaround to converting an object from JS to a Dart Map.

Implementation

Map jsToMap(jsObject) {
  return new Map.fromIterable(
    _getKeysOfObject(jsObject),
    value: (key) => getProperty(jsObject, key),
  );
}