table 6.7.0 → 6.7.1

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.
package/dist/index.js CHANGED
@@ -11,7 +11,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.getBorderCharacters = exports.createStream = exports.table = void 0;
14
- // import chalk from 'chalk';
15
14
  const createStream_1 = require("./createStream");
16
15
  Object.defineProperty(exports, "createStream", { enumerable: true, get: function () { return createStream_1.createStream; } });
17
16
  const getBorderCharacters_1 = require("./getBorderCharacters");
package/dist/utils.js CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.distributeUnevenly = exports.countSpaceSequence = exports.groupBySizes = exports.makeBorderConfig = exports.splitAnsi = exports.normalizeString = void 0;
7
7
  const slice_ansi_1 = __importDefault(require("slice-ansi"));
8
+ const string_width_1 = __importDefault(require("string-width"));
8
9
  const strip_ansi_1 = __importDefault(require("strip-ansi"));
9
10
  const getBorderCharacters_1 = require("./getBorderCharacters");
10
11
  /**
@@ -22,9 +23,7 @@ exports.normalizeString = normalizeString;
22
23
  * @internal
23
24
  */
24
25
  const splitAnsi = (input) => {
25
- const lengths = strip_ansi_1.default(input).split('\n').map(({ length }) => {
26
- return length;
27
- });
26
+ const lengths = strip_ansi_1.default(input).split('\n').map(string_width_1.default);
28
27
  const result = [];
29
28
  let startIndex = 0;
30
29
  lengths.forEach((length) => {
package/package.json CHANGED
@@ -90,5 +90,5 @@
90
90
  "lint": "eslint --ignore-path .gitignore ./src ./test",
91
91
  "test": "npm run create-validators && mocha --require ts-node/register \"./test/**/*.ts\""
92
92
  },
93
- "version": "6.7.0"
93
+ "version": "6.7.1"
94
94
  }