@cocreate/crdt
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -0,1 +1,8 @@ | ||
## [1.1.4](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.1.3...v1.1.4) (2021-06-06) | ||
### Bug Fixes | ||
* update packages, add uuid, add data-parse to demos ([e718869](https://github.com/CoCreate-app/CoCreate-crdt/commit/e718869904121232b33f018106774d34fea7bee7)) | ||
## [1.1.3](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.1.2...v1.1.3) (2021-06-04) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@cocreate/crdt", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "CoCreate crdt", | ||
@@ -20,5 +20,5 @@ "author": "CoCreate LLC", | ||
"@cocreate/cursors": "^1.1.8", | ||
"y-indexeddb": "^9.0.5", | ||
"y-indexeddb": "^9.0.6", | ||
"y-webrtc": "^10.1.5", | ||
"y-websocket": "^1.2.5", | ||
"y-websocket": "^1.3.15", | ||
"yjs": "^13.5.9" | ||
@@ -47,5 +47,4 @@ }, | ||
"webpack-cli": "^4.5.0", | ||
"webpack-log": "^3.0.1", | ||
"y-protocols": "^1.0.4" | ||
"webpack-log": "^3.0.1" | ||
} | ||
} |
@@ -7,3 +7,3 @@ import * as Y from 'yjs' | ||
const debug = true; | ||
const debug = false; | ||
@@ -10,0 +10,0 @@ class CoCreateYSocket { |
@@ -5,2 +5,3 @@ "use strict"; | ||
import uuid from '@cocreate/uuid' | ||
import { userColor } from './usercolor.js' | ||
@@ -24,4 +25,4 @@ | ||
if (cursor_user == null){ | ||
var uuid = this.generateUUID(4) | ||
let cursor_user = 'User : ' + uuid; | ||
var randomid = uuid.generate(4) | ||
let cursor_user = 'User : ' + randomid; | ||
localStorage.setItem('cursor_user',cursor_user) | ||
@@ -65,25 +66,2 @@ if(this.debug) | ||
generateUUID(length=null) { | ||
var d = new Date().getTime(); | ||
var d2 = (performance && performance.now && (performance.now()*1000)) || 0;//Time in microseconds since page-load or 0 if unsupported | ||
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | ||
var r = Math.random() * 16; | ||
if(d > 0){ | ||
var r = (d + r)%16 | 0; | ||
d = Math.floor(d/16); | ||
} else { | ||
var r = (d2 + r)%16 | 0; | ||
d2 = Math.floor(d2/16); | ||
} | ||
return (c=='x' ? r : (r&0x7|0x8)).toString(16); | ||
}); | ||
if(length!=null){ | ||
uuid = uuid.substr(0,length) | ||
} | ||
return uuid; | ||
} | ||
}//en class | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
287309
16
1144
Updatedy-indexeddb@^9.0.6
Updatedy-websocket@^1.3.15