@zoodogood/utils 1.0.7-change.884 → 1.0.7-change.903

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.
@@ -2,6 +2,8 @@ export * from './CustomCollector.js';
2
2
  export * from './GlitchText.js';
3
3
  export * from './getRandomNumberInRange.js';
4
4
  export * from './rangeToArray.js';
5
+ export * from './getRandomElementFromArray.js';
6
+ export * from './DotNotatedInterface.js';
5
7
  declare function omit(object: Object, filter: CallableFunction): {
6
8
  [k: string]: any;
7
9
  };
@@ -2,6 +2,8 @@ export * from './CustomCollector.js';
2
2
  export * from './GlitchText.js';
3
3
  export * from './getRandomNumberInRange.js';
4
4
  export * from './rangeToArray.js';
5
+ export * from './getRandomElementFromArray.js';
6
+ export * from './DotNotatedInterface.js';
5
7
  function omit(object, filter) {
6
8
  const entries = Object.entries(object)
7
9
  .filter(([key, value], i) => filter(key, value, i));
@@ -64,6 +64,7 @@ declare class TextTableBuilder {
64
64
  private pushCellToArray;
65
65
  private pushRowToTable;
66
66
  generateTextContent(): string;
67
+ addRowWithUnwrappedCells(cells: ITableCell[], useOnAddingOptions?: ICellBuilderOptions): this;
67
68
  }
68
69
  export { TextTableBuilder };
69
70
  export { SpecialRowTypeEnum, CellAlignEnum, BorderDirectionEnum };
@@ -10,9 +10,9 @@ function isCell(target) {
10
10
  }
11
11
  return "value" in target && "options" in target;
12
12
  }
13
- function emptyCell(value = "#") {
13
+ function emptyCell() {
14
14
  return {
15
- value,
15
+ value: "",
16
16
  options: DEFAULT_CELL_OPTIONS,
17
17
  };
18
18
  }
@@ -306,6 +306,14 @@ class TextTableBuilder {
306
306
  generateTextContent() {
307
307
  return new TextTableGenerator(this.rows, this.options).generateTextContent();
308
308
  }
309
+ addRowWithUnwrappedCells(cells, useOnAddingOptions) {
310
+ const row = [];
311
+ for (const cell of cells) {
312
+ this.pushCellToArray(row, cell.value, cell.options, useOnAddingOptions);
313
+ }
314
+ this.pushRowToTable(row);
315
+ return this;
316
+ }
309
317
  }
310
318
  export { TextTableBuilder };
311
319
  export { SpecialRowTypeEnum, CellAlignEnum, BorderDirectionEnum };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@zoodogood/utils",
3
3
  "type": "module",
4
- "version": "1.0.7-change.884",
4
+ "version": "1.0.7-change.903",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "homepage": "https://zoodogood.github.io/utils",
9
9
  "scripts": {
10
- "test": "vitest",
10
+ "test": "vitest run",
11
11
  "docs-build": "cd ./docs && retype build --output ./public",
12
12
  "docs-watch": "cd ./docs && retype watch",
13
- "prepack": "tsc",
13
+ "prepack": "yarn build && yarn test",
14
14
  "build": "tsc"
15
15
  },
16
16
  "typings": "lib/index",