We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What would it take to make this library work with json1?
Initial exploration reveals these places might need to be changed:
sharedb-string-binding/index.js
Line 50 in 0837ba0
Line 65 in 0837ba0
Line 72 in 0837ba0
Line 79 in 0837ba0
Line 98 in 0837ba0
sharedb-string-binding/test/index.js
Line 38 in 0837ba0
Line 51 in 0837ba0
Line 59 in 0837ba0
The text was updated successfully, but these errors were encountered:
Need to pay attention to modification:
// This package also needs modification : https://github.com/ottypes/json0-to-1/issues/2 const json0to1 = require('ot-json0-to-1'); const json1 = require('ot-json1'); ... ... StringBinding.prototype._onOp = function (op, source) { if (source === this) return; if (op.length === 0) return; json1.type.apply(json1.type.create(this.doc.data), op); this._parseParentOp(); }; StringBinding.prototype._insert = function (index, text) { var path = this.path.concat(index); var op = { p: path, si: text }; const json1op = json0to1([op]); // Change ot command this.doc.submitOp(json1op, { source: this }); }; ... StringBinding.prototype._remove = function (index, text) { var path = this.path.concat(index); var op = { p: path, sd: text }; const json1op = json0to1([op]); this.doc.submitOp(json1op, { source: this }); };
Sorry, something went wrong.
No branches or pull requests
What would it take to make this library work with json1?
Initial exploration reveals these places might need to be changed:
sharedb-string-binding/index.js
Line 50 in 0837ba0
sharedb-string-binding/index.js
Line 65 in 0837ba0
sharedb-string-binding/index.js
Line 72 in 0837ba0
sharedb-string-binding/index.js
Line 79 in 0837ba0
sharedb-string-binding/index.js
Line 98 in 0837ba0
sharedb-string-binding/test/index.js
Line 38 in 0837ba0
sharedb-string-binding/test/index.js
Line 51 in 0837ba0
sharedb-string-binding/test/index.js
Line 59 in 0837ba0
The text was updated successfully, but these errors were encountered: