(object: any, name: string)
| 52 | } |
| 53 | |
| 54 | export function isGetter(object: any, name: string): boolean { |
| 55 | const ObjectPrototype = Object.prototype; |
| 56 | if (object === ObjectPrototype || object === null) { |
| 57 | return false; |
| 58 | } |
| 59 | const descriptor = Object.getOwnPropertyDescriptor(object, name); |
| 60 | if (descriptor === undefined) { |
| 61 | return isGetter(getPrototypeOf(object), name); |
| 62 | } |
| 63 | return typeof descriptor.get === 'function'; |
| 64 | } |
| 65 | |
| 66 | export function isSimpleObject(object: any): boolean { |
| 67 | if (!isObjectPrototype(getPrototypeOf(object))) { |
no test coverage detected