dartify<T> function
T
dartify<T>(
- dynamic jsObject
Implementation
T dartify<T>(dynamic jsObject) {
if (isBasicType(jsObject)) {
return jsObject as T;
}
if (jsObject is List) {
return jsObject.map(dartify).toList() as T;
}
var keys = objectKeys(jsObject);
var result = <String, dynamic>{};
for (var key in keys) {
result[key as String] = dartify(js_util.getProperty(jsObject, key));
}
return result as T;
}