propertyIsEnumerable static method
Implementation
static bool propertyIsEnumerable(dynamic value, dynamic key) {
key = _normalizeProperty(key);
if (value is Map) {
if (!hasOwnProperty(value, key)) return false;
return getOwnPropertyDescriptor(value, key)?.enumerable ?? true;
}
if (value is List) {
key = _normalizeIndexProperty(key);
return key is int &&
key >= 0 &&
key < value.length &&
!isArrayHole(value[key]);
}
return false;
}