table 6.7.2 → 6.7.3

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.
@@ -4,4 +4,4 @@ import type { StreamConfig } from './types/internal';
4
4
  * Makes a new configuration object out of the userConfig object
5
5
  * using default values for the missing configuration properties.
6
6
  */
7
- export declare const makeStreamConfig: (userConfig: StreamUserConfig) => StreamConfig;
7
+ export declare const makeStreamConfig: (config: StreamUserConfig) => StreamConfig;
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.makeStreamConfig = void 0;
7
- const lodash_clonedeep_1 = __importDefault(require("lodash.clonedeep"));
8
4
  const utils_1 = require("./utils");
9
5
  const validateConfig_1 = require("./validateConfig");
10
6
  /**
@@ -29,9 +25,8 @@ const makeColumnsConfig = (columnCount, columns = {}, columnDefault) => {
29
25
  * Makes a new configuration object out of the userConfig object
30
26
  * using default values for the missing configuration properties.
31
27
  */
32
- const makeStreamConfig = (userConfig) => {
33
- validateConfig_1.validateConfig('streamConfig.json', userConfig);
34
- const config = lodash_clonedeep_1.default(userConfig);
28
+ const makeStreamConfig = (config) => {
29
+ validateConfig_1.validateConfig('streamConfig.json', config);
35
30
  if (config.columnDefault.width === undefined) {
36
31
  throw new Error('Must provide config.columnDefault.width when creating a stream.');
37
32
  }
@@ -4,4 +4,4 @@ import type { Row, TableConfig } from './types/internal';
4
4
  * Makes a new configuration object out of the userConfig object
5
5
  * using default values for the missing configuration properties.
6
6
  */
7
- export declare const makeTableConfig: (rows: Row[], userConfig?: TableUserConfig) => TableConfig;
7
+ export declare const makeTableConfig: (rows: Row[], config?: TableUserConfig) => TableConfig;
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.makeTableConfig = void 0;
7
- const lodash_clonedeep_1 = __importDefault(require("lodash.clonedeep"));
8
7
  const calculateColumnWidths_1 = __importDefault(require("./calculateColumnWidths"));
9
8
  const utils_1 = require("./utils");
10
9
  const validateConfig_1 = require("./validateConfig");
@@ -45,10 +44,9 @@ const makeHeaderConfig = (config) => {
45
44
  * Makes a new configuration object out of the userConfig object
46
45
  * using default values for the missing configuration properties.
47
46
  */
48
- const makeTableConfig = (rows, userConfig = {}) => {
47
+ const makeTableConfig = (rows, config = {}) => {
49
48
  var _a, _b, _c;
50
- validateConfig_1.validateConfig('config.json', userConfig);
51
- const config = lodash_clonedeep_1.default(userConfig);
49
+ validateConfig_1.validateConfig('config.json', config);
52
50
  return {
53
51
  ...config,
54
52
  border: utils_1.makeBorderConfig(config.border),
package/package.json CHANGED
@@ -6,7 +6,6 @@
6
6
  },
7
7
  "dependencies": {
8
8
  "ajv": "^8.0.1",
9
- "lodash.clonedeep": "^4.5.0",
10
9
  "lodash.truncate": "^4.4.2",
11
10
  "slice-ansi": "^4.0.0",
12
11
  "string-width": "^4.2.3",
@@ -15,7 +14,6 @@
15
14
  "description": "Formats data into a string table.",
16
15
  "devDependencies": {
17
16
  "@types/chai": "^4.2.16",
18
- "@types/lodash.clonedeep": "^4.5.6",
19
17
  "@types/lodash.mapvalues": "^4.6.6",
20
18
  "@types/lodash.truncate": "^4.4.6",
21
19
  "@types/mocha": "^8.2.2",
@@ -90,5 +88,5 @@
90
88
  "lint": "eslint --ignore-path .gitignore ./src ./test",
91
89
  "test": "npm run create-validators && mocha --require ts-node/register \"./test/**/*.ts\""
92
90
  },
93
- "version": "6.7.2"
91
+ "version": "6.7.3"
94
92
  }