* Get or create a stable ID for an object
(obj: object)
| 9 | * Get or create a stable ID for an object |
| 10 | */ |
| 11 | function getObjectId(obj: object): number { |
| 12 | if (objectIds.has(obj)) { |
| 13 | return objectIds.get(obj)! |
| 14 | } |
| 15 | const id = nextObjectId++ |
| 16 | objectIds.set(obj, id) |
| 17 | return id |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Whether a value has no IEEE-754 natural order: `NaN`, or an invalid Date |
no test coverage detected
searching dependent graphs…