(object: any)
| 79 | * @returns the Yjs value underneath. This can be a Y.Doc, Y.Array, Y.Map or other Y-type based on the value passed in |
| 80 | */ |
| 81 | export function getYjsValue(object: any): Y.Doc | Y.AbstractType<any> | undefined { |
| 82 | if (typeof object !== "object" || object === null) { |
| 83 | return undefined; |
| 84 | } |
| 85 | const ret = object[INTERNAL_SYMBOL]; |
| 86 | if (ret) { |
| 87 | markRaw(ret); |
| 88 | (ret as any).__v_skip = true; // for vue Reactive |
| 89 | } |
| 90 | return ret; |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Check whether two objects represent the same value. |
no outgoing calls
no test coverage detected