(object: any)
| 30 | export const jsxChildrenParents: WeakMap<any, any> = new WeakMap(); |
| 31 | |
| 32 | function isObjectPrototype(object: any): boolean { |
| 33 | if (!object) { |
| 34 | return false; |
| 35 | } |
| 36 | const ObjectPrototype = Object.prototype; |
| 37 | if (object === ObjectPrototype) { |
| 38 | return true; |
| 39 | } |
| 40 | // It might be an object from a different Realm which is |
| 41 | // still just a plain simple object. |
| 42 | if (getPrototypeOf(object)) { |
| 43 | return false; |
| 44 | } |
| 45 | const names = Object.getOwnPropertyNames(object); |
| 46 | for (let i = 0; i < names.length; i++) { |
| 47 | if (!(names[i] in ObjectPrototype)) { |
| 48 | return false; |
| 49 | } |
| 50 | } |
| 51 | return true; |
| 52 | } |
| 53 | |
| 54 | export function isGetter(object: any, name: string): boolean { |
| 55 | const ObjectPrototype = Object.prototype; |
no test coverage detected