Open koraa opened 3 years ago
Type safe way of iterating the properties of arbitrary types; this is a reflection feature and refers to arbitrary types.
const entries = (o) => isdef(o) ? Object.entries(o) : []; const propertyDescriptors = (o) => isdef(o) ? Object.getOwnPropertyDescriptors(o) : []; const propertyNames = (o) => isdef(o) ? Object.getOwnPropertyNames(o) : []; const properties = (o) => map(propertyNames(o), (k) => [k, o[k]]); const getProperty = (o, k) => isdef(o) ? o[k] : undefined;
Type safe way of iterating the properties of arbitrary types; this is a reflection feature and refers to arbitrary types.