(record: YMap<any>, keyField: string)
| 12 | }; |
| 13 | |
| 14 | function getRecordKey(record: YMap<any>, keyField: string): string | null { |
| 15 | const keyRaw = record.get(keyField); |
| 16 | if (typeof keyRaw === 'string') { |
| 17 | return keyRaw; |
| 18 | } |
| 19 | if (typeof keyRaw?.toString === 'function') { |
| 20 | return keyRaw.toString(); |
| 21 | } |
| 22 | return null; |
| 23 | } |
| 24 | |
| 25 | function isDeletedRecord(record: YMap<any>): boolean { |
| 26 | return record.get(DELETE_FLAG_KEY) === true || record.size === 0; |
no test coverage detected