add merge tests for #263
This commit is contained in:
@@ -72,5 +72,6 @@ export {
|
||||
tryGc,
|
||||
transact,
|
||||
AbstractConnector,
|
||||
logType
|
||||
logType,
|
||||
mergeUpdates
|
||||
} from './internals.js'
|
||||
|
||||
@@ -15,6 +15,7 @@ export * from './utils/Snapshot.js'
|
||||
export * from './utils/StructStore.js'
|
||||
export * from './utils/Transaction.js'
|
||||
export * from './utils/UndoManager.js'
|
||||
export * from './utils/updates.js'
|
||||
export * from './utils/YEvent.js'
|
||||
|
||||
export * from './types/AbstractType.js'
|
||||
|
||||
16
src/utils/updates.js
Normal file
16
src/utils/updates.js
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
/**
|
||||
* @param {Array<Uint8Array>} updates
|
||||
* @return {Uint8Array}
|
||||
*/
|
||||
export const mergeUpdates = updates => {
|
||||
return updates[0]
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Uint8Array} update
|
||||
* @param {Uint8Array} sv
|
||||
*/
|
||||
export const diffUpdate = (update, sv) => {
|
||||
return update
|
||||
}
|
||||
Reference in New Issue
Block a user