| /** @internal */ | |
| export const getAllObjectKeys = (obj: object): Set<PropertyKey> => { | |
| const keys = new Set<PropertyKey>(Reflect.ownKeys(obj)) | |
| if (obj.constructor === Object) return keys | |
| if (obj instanceof Error) { | |
| keys.delete("stack") | |
| } | |
| const proto = Object.getPrototypeOf(obj) | |
| let current = proto | |
| while (current !== null && current !== Object.prototype) { | |
| const ownKeys = Reflect.ownKeys(current) | |
| for (let i = 0; i < ownKeys.length; i++) { | |
| keys.add(ownKeys[i]) | |
| } | |
| current = Object.getPrototypeOf(current) | |
| } | |
| if (keys.has("constructor") && typeof obj.constructor === "function" && proto === obj.constructor.prototype) { | |
| keys.delete("constructor") | |
| } | |
| return keys | |
| } | |
| /** @internal */ | |
| export const byReferenceInstances = new WeakSet<object>() | |
Xet Storage Details
- Size:
- 793 Bytes
- Xet hash:
- 884e7e4ce9a79f3455a0a01516229fce30cfc18f77e2716d244e45a7be4853a1
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.