MCPcopy
hub / github.com/loggerhead/json4u / clone

Method clone

src/lib/table/tableNode.ts:81–88  ·  view source on GitHub ↗
(fields?: Partial<TableNode>)

Source from the content-addressed store, hash-verified

79 }
80
81 clone(fields?: Partial<TableNode>) {
82 const nd = new TableNode(this.type);
83 Object.assign(nd, this);
84 nd.borderFlags = { ...this.borderFlags };
85 nd.classNames = [...this.classNames];
86 Object.assign(nd, fields);
87 return nd;
88 }
89
90 // Sets the text content of the node and calculates its initial width based on the text length.
91 setText(t: string) {

Callers 1

newDummyNodeFunction · 0.80

Calls 1

assignMethod · 0.80

Tested by

no test coverage detected