Skip to content

Commit dbeb8d5

Browse files
committed
feat(json-crdt): 🎸 improve node .toString() appearance
1 parent e3dc599 commit dbeb8d5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/json-crdt/nodes/obj/ObjNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export class ObjNode<Value extends Record<string, JsonNode> = Record<string, Jso
128128
// ---------------------------------------------------------------- Printable
129129

130130
public toString(tab: string = ''): string {
131-
const header = this.constructor.name + ' "obj" ' + toDisplayString(this.id);
131+
const header = this.constructor.name + ' ' + toDisplayString(this.id);
132132
return (
133133
header +
134134
printTree(

src/json-crdt/nodes/val/ValNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class ValNode<Value extends JsonNode = JsonNode> implements JsonNode<Read
8585

8686
public toString(tab: string = ''): string {
8787
const node = this.node();
88-
const header = this.constructor.name + toDisplayString(this.id);
88+
const header = this.constructor.name + ' ' + toDisplayString(this.id);
8989
return header + printTree(tab, [(tab) => (node ? node.toString(tab) : toDisplayString(this.val))]);
9090
}
9191
}

src/json-crdt/nodes/vec/VecNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class VecNode<Value extends JsonNode[] = JsonNode[]>
176176
const extNode = this.ext();
177177
const header =
178178
this.constructor.name +
179-
' "vec" ' +
179+
' ' +
180180
toDisplayString(this.id) +
181181
(extNode ? ` { extension = ${this.getExtId()} }` : '');
182182
if (extNode) {

0 commit comments

Comments
 (0)