export V1 ⇔ V2 update format conversion. Closes #363

This commit is contained in:
Kevin Jahns
2021-12-15 18:45:08 +01:00
parent 9569d3e297
commit 1cf709093c
2 changed files with 28 additions and 3 deletions

View File

@@ -85,12 +85,16 @@ export {
encodeRelativePosition,
decodeRelativePosition,
diffUpdate,
diffUpdateV2
diffUpdateV2,
convertUpdateFormatV1ToV2,
convertUpdateFormatV2ToV1
} from './internals.js'
const glo = /** @type {any} */ (typeof window !== 'undefined'
? window
// @ts-ignore
: typeof global !== 'undefined' ? global : {})
const importIdentifier = '__ $YJS$ __'
if (glo[importIdentifier] === true) {