@zoodogood/utils 1.0.6-change.708 → 1.0.6-change.712

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,8 +84,9 @@ class TextTableGenerator {
84
84
  row = row;
85
85
  content += (_c = (_b = (_a = this.options).borderLeft) === null || _b === void 0 ? void 0 : _b.call(_a, context, context.currentRow)) !== null && _c !== void 0 ? _c : "";
86
86
  console.log(row);
87
- for (const cellIndex in row) {
87
+ for (const cellIndex of Object.keys(row)) {
88
88
  const cell = row.at(+cellIndex);
89
+ console.log(cellIndex);
89
90
  console.log(cell);
90
91
  const expectedWidth = metadata.columns.at(+cellIndex).largestLength;
91
92
  content += this.drawCell(cell, expectedWidth);
@@ -126,7 +127,7 @@ class TextTableGenerator {
126
127
  let content = "";
127
128
  const context = this.context;
128
129
  const length = this.calculateTableWidth();
129
- for (const index in [...new Array(length)]) {
130
+ for (const index of [...new Array(length)].map((_, index) => index)) {
130
131
  const symbol = setSymbol(context, +index);
131
132
  content += symbol;
132
133
  }
@@ -264,6 +265,5 @@ class TextTableBuilder {
264
265
  }
265
266
  export { TextTableBuilder };
266
267
  export { SpecialRowTypeEnum, CellAlignEnum, BorderDirectionEnum };
267
- const builder = new TextTableBuilder()
268
- .addRowWithElements(["1", "2", "3"]);
268
+ const builder = new TextTableBuilder().addRowWithElements(["1", "2", "3"]);
269
269
  console.log(builder.generateTextContent());
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zoodogood/utils",
3
3
  "type": "module",
4
- "version": "1.0.6-change.708",
4
+ "version": "1.0.6-change.712",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",