(objectA: any, objectB: any)
| 100 | * @returns true if they represent the same object, false otherwise |
| 101 | */ |
| 102 | export function areSame(objectA: any, objectB: any) { |
| 103 | if (objectA === objectB) { |
| 104 | return true; |
| 105 | } |
| 106 | if (typeof objectA === "object" && typeof objectB === "object") { |
| 107 | const internalA = getYjsValue(objectA); |
| 108 | const internalB = getYjsValue(objectB); |
| 109 | if (!internalA || !internalB) { |
| 110 | // one of them doesn't have an internal value |
| 111 | return false; |
| 112 | } |
| 113 | return internalA === internalB; |
| 114 | } |
| 115 | return false; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Create a SyncedStore store |
no test coverage detected