(obj: object)
| 5 | // This equivalent is faster on V8: Object.keys returns only enumerable string keys, |
| 6 | // so we only need to filter symbol keys for enumerability. See also assert/equal.ts. |
| 7 | function getEnumerableKeys(obj: object): PropertyKey[] { |
| 8 | const stringKeys = Object.keys(obj); |
| 9 | const symbolKeys = Object.getOwnPropertySymbols(obj).filter((key) => |
| 10 | Object.prototype.propertyIsEnumerable.call(obj, key) |
| 11 | ); |
| 12 | return [...stringKeys, ...symbolKeys]; |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * A record type where values can be promise-like (thenables) or plain values. |
no test coverage detected