Filters out all but an object's own properties
(obj: unknown)
| 158 | |
| 159 | /** Filters out all but an object's own properties */ |
| 160 | function getOwnProperties(obj: unknown): { [key: string]: unknown } { |
| 161 | if (typeof obj === 'object' && obj !== null) { |
| 162 | return Object.fromEntries(Object.entries(obj)); |
| 163 | } |
| 164 | return {}; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * Given any captured exception, extract its keys and create a sorted |
no test coverage detected