File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,12 @@ export class Patch implements Printable {
207207 public toString(tab: string = ''): string {
208208 const id = this.getId();
209209 const header = `${this.constructor.name} ${id ? printTs(id) : '(nil)'}!${this.span()}`;
210- return header + printTree(tab, this.ops.map((op) => (tab) => op.toString(tab)));
210+ return (
211+ header +
212+ printTree(
213+ tab,
214+ this.ops.map((op) => (tab) => op.toString(tab)),
215+ )
216+ );
211217 }
212218}
Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ const builder = new PatchBuilder(clock);
1515builder.json({
1616 bools: konst([true, false]),
1717}),
18-
19- console.log(builder.patch + '');
18+ console.log(builder.patch + '');
2019
2120// Patch 123.456!3
2221// ├─ "obj" 123.456
Original file line number Diff line number Diff line change @@ -210,7 +210,13 @@ export class InsObjOp implements IJsonCrdtPatchEditOperation {
210210
211211 public toString(tab: string = ''): string {
212212 const header = `${this.name()} ${printTs(this.id)}!${this.span()}, obj = ${printTs(this.obj)}`;
213- return header + printTree(tab, this.data.map((item) => (tab) => `${JSON.stringify(item[0])}: ${printTs(item[1])}`));
213+ return (
214+ header +
215+ printTree(
216+ tab,
217+ this.data.map((item) => (tab) => `${JSON.stringify(item[0])}: ${printTs(item[1])}`),
218+ )
219+ );
214220 }
215221}
216222
@@ -236,7 +242,13 @@ export class InsVecOp implements IJsonCrdtPatchEditOperation {
236242
237243 public toString(tab: string = ''): string {
238244 const header = `${this.name()} ${printTs(this.id)}!${this.span()}, obj = ${printTs(this.obj)}`;
239- return header + printTree(tab, this.data.map((item) => (tab) => `${item[0]}: ${printTs(item[1])}`));
245+ return (
246+ header +
247+ printTree(
248+ tab,
249+ this.data.map((item) => (tab) => `${item[0]}: ${printTs(item[1])}`),
250+ )
251+ );
240252 }
241253}
242254
You can’t perform that action at this time.
0 commit comments