Comparing version 6.3.3 to 6.3.4
@@ -1,2 +0,3 @@ | ||
declare const _default: (subject: string, containerWidth: number, alignment: string) => string; | ||
import type { ColumnUserConfig } from './types/api'; | ||
declare const _default: (subject: string, containerWidth: number, alignment: ColumnUserConfig['alignment']) => string; | ||
/** | ||
@@ -3,0 +4,0 @@ * Pads a string to the left and/or right to position the subject |
@@ -24,7 +24,2 @@ "use strict"; | ||
}; | ||
const alignments = [ | ||
'left', | ||
'right', | ||
'center', | ||
]; | ||
/** | ||
@@ -45,8 +40,2 @@ * Pads a string to the left and/or right to position the subject | ||
} | ||
if (typeof alignment !== 'string') { | ||
throw new TypeError('Alignment parameter value must be a string.'); | ||
} | ||
if (!alignments.includes(alignment)) { | ||
throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); | ||
} | ||
if (subjectWidth === 0) { | ||
@@ -53,0 +42,0 @@ return ' '.repeat(containerWidth); |
@@ -19,5 +19,2 @@ "use strict"; | ||
} | ||
if (config.columns[index1].wrapWord !== true && config.columns[index1].wrapWord !== false) { | ||
throw new TypeError('column[index].wrapWord must be a boolean.'); | ||
} | ||
cellHeightIndex[index1] = calculateCellHeight_1.default(value, config.columns[index1].width, config.columns[index1].wrapWord); | ||
@@ -24,0 +21,0 @@ }); |
@@ -8,6 +8,5 @@ "use strict"; | ||
exports.default = (schemaId, config) => { | ||
var _a; | ||
const validate = validators_1.default[schemaId]; | ||
if (!validate(config)) { | ||
const errors = (_a = validate.errors) === null || _a === void 0 ? void 0 : _a.map((error) => { | ||
if (!validate(config) && validate.errors) { | ||
const errors = validate.errors.map((error) => { | ||
return { | ||
@@ -14,0 +13,0 @@ message: error.message, |
@@ -93,3 +93,3 @@ { | ||
}, | ||
"version": "6.3.3" | ||
"version": "6.3.4" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116358
2585