Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cocreate/crdt

Package Overview
Dependencies
Maintainers
1
Versions
265
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/crdt - npm Package Compare versions

Comparing version 1.2.6 to 1.3.0

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.3.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.2.6...v1.3.0) (2021-08-18)
### Features
* crdt.getDoc to see if element already has a doc ([8972518](https://github.com/CoCreate-app/CoCreate-crdt/commit/8972518432c8b766eca26663c77308bc9087cd68))
## [1.2.6](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.2.5...v1.2.6) (2021-08-16)

@@ -2,0 +9,0 @@

2

package.json
{
"name": "@cocreate/crdt",
"version": "1.2.6",
"version": "1.3.0",
"description": "CoCreate crdt",

@@ -5,0 +5,0 @@ "author": "CoCreate LLC",

@@ -373,3 +373,47 @@ import * as Y from 'yjs';

}
/*
crdt.getText({
collection: 'module_activities',
document_id: '5e4802ce3ed96d38e71fc7e5',
name: 'name'
})
*/
getText(info) {
try{
let docName = this.generateDocName(info)
let typeName = this.generateTypeName(info)
if (docName) {
return this.docs[docName].doc.getText(typeName).toString();
}
else return "--";
}
catch (e) {
console.error(e);
return "";
}
}
/*
crdt.getDoc({
collection: 'module_activities',
document_id: '5e4802ce3ed96d38e71fc7e5',
name: 'name'
})
*/
getDoc(info) {
try{
let docName = this.generateDocName(info)
let typeName = this.generateTypeName(info)
if (docName) {
return this.docs[docName].doc.getText(typeName);
}
else return false;
}
catch (e) {
console.error(e);
return false;
}
}
/*

@@ -376,0 +420,0 @@ crdt.getPosition(function(data))

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc