Socket
Socket
Sign inDemoInstall

table

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

table - npm Package Compare versions

Comparing version 6.3.4 to 6.4.0

3

dist/alignString.js

@@ -32,5 +32,2 @@ "use strict";

}
if (typeof containerWidth !== 'number') {
throw new TypeError('Container width parameter value must be a number.');
}
const subjectWidth = string_width_1.default(subject);

@@ -37,0 +34,0 @@ if (subjectWidth > containerWidth) {

@@ -11,6 +11,3 @@ "use strict";

}
if (!Number.isInteger(columnWidth) || columnWidth < 1) {
throw new TypeError('Column width must be an integer greater than 0.');
}
return wrapCell_1.default(value, columnWidth, useWrapWord).length;
};

@@ -16,5 +16,2 @@ "use strict";

cells.forEach((value, index1) => {
if (typeof config.columns[index1].width !== 'number') {
throw new TypeError('column[index].width must be a number.');
}
cellHeightIndex[index1] = calculateCellHeight_1.default(value, config.columns[index1].width, config.columns[index1].wrapWord);

@@ -21,0 +18,0 @@ });

4

dist/generated/validators.d.ts

@@ -7,3 +7,3 @@ declare function validate43(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {

}): boolean;
declare function validate69(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
declare function validate70(data: any, { instancePath, parentData, parentDataProperty, rootData }?: {
instancePath?: string | undefined;

@@ -14,2 +14,2 @@ parentData: any;

}): boolean;
export { validate43 as _config_json, validate69 as _streamConfig_json };
export { validate43 as _config_json, validate70 as _streamConfig_json };

@@ -320,9 +320,16 @@ "use strict";

const schema17 = {
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"$ref": "#/definitions/column"
}
},
"additionalProperties": false
"oneOf": [{
"type": "object",
"patternProperties": {
"^[0-9]+$": {
"$ref": "#/definitions/column"
}
},
"additionalProperties": false
}, {
"type": "array",
"items": {
"$ref": "#/definitions/column"
}
}]
};

@@ -338,3 +345,5 @@ const pattern0 = new RegExp("^[0-9]+$", "u");

"width": {
"type": "number"
"type": "number",
"minimum": 1,
"multipleOf": 1
},

@@ -422,4 +431,44 @@ "wrapWord": {

let data1 = data.width;
if (!((typeof data1 == "number") && (isFinite(data1)))) {
const err3 = {
if ((typeof data1 == "number") && (isFinite(data1))) {
if (data1 < 1 || isNaN(data1)) {
const err3 = {
instancePath: instancePath + "/width",
schemaPath: "#/properties/width/minimum",
keyword: "minimum",
params: {
comparison: ">=",
limit: 1
},
message: "must be >= 1"
};
if (vErrors === null) {
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
let res0;
if ((1 === 0 || (res0 = data1 / 1, res0 !== parseInt(res0)))) {
const err4 = {
instancePath: instancePath + "/width",
schemaPath: "#/properties/width/multipleOf",
keyword: "multipleOf",
params: {
multipleOf: 1
},
message: "must be multiple of 1"
};
if (vErrors === null) {
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
}
else {
const err5 = {
instancePath: instancePath + "/width",

@@ -434,6 +483,6 @@ schemaPath: "#/properties/width/type",

if (vErrors === null) {
vErrors = [err3];
vErrors = [err5];
}
else {
vErrors.push(err3);
vErrors.push(err5);
}

@@ -445,3 +494,3 @@ errors++;

if (typeof data.wrapWord !== "boolean") {
const err4 = {
const err6 = {
instancePath: instancePath + "/wrapWord",

@@ -456,6 +505,6 @@ schemaPath: "#/properties/wrapWord/type",

if (vErrors === null) {
vErrors = [err4];
vErrors = [err6];
}
else {
vErrors.push(err4);
vErrors.push(err6);
}

@@ -468,3 +517,3 @@ errors++;

if (!((typeof data3 == "number") && (isFinite(data3)))) {
const err5 = {
const err7 = {
instancePath: instancePath + "/truncate",

@@ -479,6 +528,6 @@ schemaPath: "#/properties/truncate/type",

if (vErrors === null) {
vErrors = [err5];
vErrors = [err7];
}
else {
vErrors.push(err5);
vErrors.push(err7);
}

@@ -491,3 +540,3 @@ errors++;

if (!((typeof data4 == "number") && (isFinite(data4)))) {
const err6 = {
const err8 = {
instancePath: instancePath + "/paddingLeft",

@@ -502,6 +551,6 @@ schemaPath: "#/properties/paddingLeft/type",

if (vErrors === null) {
vErrors = [err6];
vErrors = [err8];
}
else {
vErrors.push(err6);
vErrors.push(err8);
}

@@ -514,3 +563,3 @@ errors++;

if (!((typeof data5 == "number") && (isFinite(data5)))) {
const err7 = {
const err9 = {
instancePath: instancePath + "/paddingRight",

@@ -525,6 +574,6 @@ schemaPath: "#/properties/paddingRight/type",

if (vErrors === null) {
vErrors = [err7];
vErrors = [err9];
}
else {
vErrors.push(err7);
vErrors.push(err9);
}

@@ -536,3 +585,3 @@ errors++;

else {
const err8 = {
const err10 = {
instancePath,

@@ -547,6 +596,6 @@ schemaPath: "#/type",

if (vErrors === null) {
vErrors = [err8];
vErrors = [err10];
}
else {
vErrors.push(err8);
vErrors.push(err10);
}

@@ -561,2 +610,6 @@ errors++;

let errors = 0;
const _errs0 = errors;
let valid0 = false;
let passing0 = null;
const _errs1 = errors;
if (data && typeof data == "object" && !Array.isArray(data)) {

@@ -567,3 +620,3 @@ for (const key0 in data) {

instancePath,
schemaPath: "#/additionalProperties",
schemaPath: "#/oneOf/0/additionalProperties",
keyword: "additionalProperties",

@@ -601,3 +654,3 @@ params: {

instancePath,
schemaPath: "#/type",
schemaPath: "#/oneOf/0/type",
keyword: "type",

@@ -617,6 +670,84 @@ params: {

}
var _valid0 = _errs1 === errors;
if (_valid0) {
valid0 = true;
passing0 = 0;
}
const _errs5 = errors;
if (Array.isArray(data)) {
const len0 = data.length;
for (let i0 = 0; i0 < len0; i0++) {
if (!(validate64(data[i0], {
instancePath: instancePath + "/" + i0,
parentData: data,
parentDataProperty: i0,
rootData
}))) {
vErrors = vErrors === null ? validate64.errors : vErrors.concat(validate64.errors);
errors = vErrors.length;
}
}
}
else {
const err2 = {
instancePath,
schemaPath: "#/oneOf/1/type",
keyword: "type",
params: {
type: "array"
},
message: "must be array"
};
if (vErrors === null) {
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
var _valid0 = _errs5 === errors;
if (_valid0 && valid0) {
valid0 = false;
passing0 = [passing0, 1];
}
else {
if (_valid0) {
valid0 = true;
passing0 = 1;
}
}
if (!valid0) {
const err3 = {
instancePath,
schemaPath: "#/oneOf",
keyword: "oneOf",
params: {
passingSchemas: passing0
},
message: "must match exactly one schema in oneOf"
};
if (vErrors === null) {
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
else {
errors = _errs0;
if (vErrors !== null) {
if (_errs0) {
vErrors.length = _errs0;
}
else {
vErrors = null;
}
}
}
validate63.errors = vErrors;
return errors === 0;
}
function validate67(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
function validate68(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
let vErrors = null;

@@ -686,4 +817,44 @@ let errors = 0;

let data1 = data.width;
if (!((typeof data1 == "number") && (isFinite(data1)))) {
const err3 = {
if ((typeof data1 == "number") && (isFinite(data1))) {
if (data1 < 1 || isNaN(data1)) {
const err3 = {
instancePath: instancePath + "/width",
schemaPath: "#/properties/width/minimum",
keyword: "minimum",
params: {
comparison: ">=",
limit: 1
},
message: "must be >= 1"
};
if (vErrors === null) {
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
let res0;
if ((1 === 0 || (res0 = data1 / 1, res0 !== parseInt(res0)))) {
const err4 = {
instancePath: instancePath + "/width",
schemaPath: "#/properties/width/multipleOf",
keyword: "multipleOf",
params: {
multipleOf: 1
},
message: "must be multiple of 1"
};
if (vErrors === null) {
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
}
else {
const err5 = {
instancePath: instancePath + "/width",

@@ -698,6 +869,6 @@ schemaPath: "#/properties/width/type",

if (vErrors === null) {
vErrors = [err3];
vErrors = [err5];
}
else {
vErrors.push(err3);
vErrors.push(err5);
}

@@ -709,3 +880,3 @@ errors++;

if (typeof data.wrapWord !== "boolean") {
const err4 = {
const err6 = {
instancePath: instancePath + "/wrapWord",

@@ -720,6 +891,6 @@ schemaPath: "#/properties/wrapWord/type",

if (vErrors === null) {
vErrors = [err4];
vErrors = [err6];
}
else {
vErrors.push(err4);
vErrors.push(err6);
}

@@ -732,3 +903,3 @@ errors++;

if (!((typeof data3 == "number") && (isFinite(data3)))) {
const err5 = {
const err7 = {
instancePath: instancePath + "/truncate",

@@ -743,6 +914,6 @@ schemaPath: "#/properties/truncate/type",

if (vErrors === null) {
vErrors = [err5];
vErrors = [err7];
}
else {
vErrors.push(err5);
vErrors.push(err7);
}

@@ -755,3 +926,3 @@ errors++;

if (!((typeof data4 == "number") && (isFinite(data4)))) {
const err6 = {
const err8 = {
instancePath: instancePath + "/paddingLeft",

@@ -766,6 +937,6 @@ schemaPath: "#/properties/paddingLeft/type",

if (vErrors === null) {
vErrors = [err6];
vErrors = [err8];
}
else {
vErrors.push(err6);
vErrors.push(err8);
}

@@ -778,3 +949,3 @@ errors++;

if (!((typeof data5 == "number") && (isFinite(data5)))) {
const err7 = {
const err9 = {
instancePath: instancePath + "/paddingRight",

@@ -789,6 +960,6 @@ schemaPath: "#/properties/paddingRight/type",

if (vErrors === null) {
vErrors = [err7];
vErrors = [err9];
}
else {
vErrors.push(err7);
vErrors.push(err9);
}

@@ -800,3 +971,3 @@ errors++;

else {
const err8 = {
const err10 = {
instancePath,

@@ -811,10 +982,10 @@ schemaPath: "#/type",

if (vErrors === null) {
vErrors = [err8];
vErrors = [err10];
}
else {
vErrors.push(err8);
vErrors.push(err10);
}
errors++;
}
validate67.errors = vErrors;
validate68.errors = vErrors;
return errors === 0;

@@ -870,3 +1041,3 @@ }

if (data.columnDefault !== undefined) {
if (!(validate67(data.columnDefault, {
if (!(validate68(data.columnDefault, {
instancePath: instancePath + "/columnDefault",

@@ -877,3 +1048,3 @@ parentData: data,

}))) {
vErrors = vErrors === null ? validate67.errors : vErrors.concat(validate67.errors);
vErrors = vErrors === null ? validate68.errors : vErrors.concat(validate68.errors);
errors = vErrors.length;

@@ -958,3 +1129,3 @@ }

}
exports["streamConfig.json"] = validate69;
exports["streamConfig.json"] = validate70;
const schema20 = {

@@ -983,3 +1154,3 @@ "$id": "streamConfig.json",

};
function validate70(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
function validate71(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
let vErrors = null;

@@ -1192,8 +1363,12 @@ let errors = 0;

}
validate70.errors = vErrors;
validate71.errors = vErrors;
return errors === 0;
}
function validate87(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
function validate88(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
let vErrors = null;
let errors = 0;
const _errs0 = errors;
let valid0 = false;
let passing0 = null;
const _errs1 = errors;
if (data && typeof data == "object" && !Array.isArray(data)) {

@@ -1204,3 +1379,3 @@ for (const key0 in data) {

instancePath,
schemaPath: "#/additionalProperties",
schemaPath: "#/oneOf/0/additionalProperties",
keyword: "additionalProperties",

@@ -1238,3 +1413,3 @@ params: {

instancePath,
schemaPath: "#/type",
schemaPath: "#/oneOf/0/type",
keyword: "type",

@@ -1254,6 +1429,84 @@ params: {

}
validate87.errors = vErrors;
var _valid0 = _errs1 === errors;
if (_valid0) {
valid0 = true;
passing0 = 0;
}
const _errs5 = errors;
if (Array.isArray(data)) {
const len0 = data.length;
for (let i0 = 0; i0 < len0; i0++) {
if (!(validate64(data[i0], {
instancePath: instancePath + "/" + i0,
parentData: data,
parentDataProperty: i0,
rootData
}))) {
vErrors = vErrors === null ? validate64.errors : vErrors.concat(validate64.errors);
errors = vErrors.length;
}
}
}
else {
const err2 = {
instancePath,
schemaPath: "#/oneOf/1/type",
keyword: "type",
params: {
type: "array"
},
message: "must be array"
};
if (vErrors === null) {
vErrors = [err2];
}
else {
vErrors.push(err2);
}
errors++;
}
var _valid0 = _errs5 === errors;
if (_valid0 && valid0) {
valid0 = false;
passing0 = [passing0, 1];
}
else {
if (_valid0) {
valid0 = true;
passing0 = 1;
}
}
if (!valid0) {
const err3 = {
instancePath,
schemaPath: "#/oneOf",
keyword: "oneOf",
params: {
passingSchemas: passing0
},
message: "must match exactly one schema in oneOf"
};
if (vErrors === null) {
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
else {
errors = _errs0;
if (vErrors !== null) {
if (_errs0) {
vErrors.length = _errs0;
}
else {
vErrors = null;
}
}
}
validate88.errors = vErrors;
return errors === 0;
}
function validate90(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
function validate92(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
let vErrors = null;

@@ -1323,4 +1576,44 @@ let errors = 0;

let data1 = data.width;
if (!((typeof data1 == "number") && (isFinite(data1)))) {
const err3 = {
if ((typeof data1 == "number") && (isFinite(data1))) {
if (data1 < 1 || isNaN(data1)) {
const err3 = {
instancePath: instancePath + "/width",
schemaPath: "#/properties/width/minimum",
keyword: "minimum",
params: {
comparison: ">=",
limit: 1
},
message: "must be >= 1"
};
if (vErrors === null) {
vErrors = [err3];
}
else {
vErrors.push(err3);
}
errors++;
}
let res0;
if ((1 === 0 || (res0 = data1 / 1, res0 !== parseInt(res0)))) {
const err4 = {
instancePath: instancePath + "/width",
schemaPath: "#/properties/width/multipleOf",
keyword: "multipleOf",
params: {
multipleOf: 1
},
message: "must be multiple of 1"
};
if (vErrors === null) {
vErrors = [err4];
}
else {
vErrors.push(err4);
}
errors++;
}
}
else {
const err5 = {
instancePath: instancePath + "/width",

@@ -1335,6 +1628,6 @@ schemaPath: "#/properties/width/type",

if (vErrors === null) {
vErrors = [err3];
vErrors = [err5];
}
else {
vErrors.push(err3);
vErrors.push(err5);
}

@@ -1346,3 +1639,3 @@ errors++;

if (typeof data.wrapWord !== "boolean") {
const err4 = {
const err6 = {
instancePath: instancePath + "/wrapWord",

@@ -1357,6 +1650,6 @@ schemaPath: "#/properties/wrapWord/type",

if (vErrors === null) {
vErrors = [err4];
vErrors = [err6];
}
else {
vErrors.push(err4);
vErrors.push(err6);
}

@@ -1369,3 +1662,3 @@ errors++;

if (!((typeof data3 == "number") && (isFinite(data3)))) {
const err5 = {
const err7 = {
instancePath: instancePath + "/truncate",

@@ -1380,6 +1673,6 @@ schemaPath: "#/properties/truncate/type",

if (vErrors === null) {
vErrors = [err5];
vErrors = [err7];
}
else {
vErrors.push(err5);
vErrors.push(err7);
}

@@ -1392,3 +1685,3 @@ errors++;

if (!((typeof data4 == "number") && (isFinite(data4)))) {
const err6 = {
const err8 = {
instancePath: instancePath + "/paddingLeft",

@@ -1403,6 +1696,6 @@ schemaPath: "#/properties/paddingLeft/type",

if (vErrors === null) {
vErrors = [err6];
vErrors = [err8];
}
else {
vErrors.push(err6);
vErrors.push(err8);
}

@@ -1415,3 +1708,3 @@ errors++;

if (!((typeof data5 == "number") && (isFinite(data5)))) {
const err7 = {
const err9 = {
instancePath: instancePath + "/paddingRight",

@@ -1426,6 +1719,6 @@ schemaPath: "#/properties/paddingRight/type",

if (vErrors === null) {
vErrors = [err7];
vErrors = [err9];
}
else {
vErrors.push(err7);
vErrors.push(err9);
}

@@ -1437,3 +1730,3 @@ errors++;

else {
const err8 = {
const err10 = {
instancePath,

@@ -1448,13 +1741,13 @@ schemaPath: "#/type",

if (vErrors === null) {
vErrors = [err8];
vErrors = [err10];
}
else {
vErrors.push(err8);
vErrors.push(err10);
}
errors++;
}
validate90.errors = vErrors;
validate92.errors = vErrors;
return errors === 0;
}
function validate69(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
function validate70(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
/*# sourceURL="streamConfig.json" */ ;

@@ -1485,3 +1778,3 @@ let vErrors = null;

if (data.border !== undefined) {
if (!(validate70(data.border, {
if (!(validate71(data.border, {
instancePath: instancePath + "/border",

@@ -1492,3 +1785,3 @@ parentData: data,

}))) {
vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors);
vErrors = vErrors === null ? validate71.errors : vErrors.concat(validate71.errors);
errors = vErrors.length;

@@ -1498,3 +1791,3 @@ }

if (data.columns !== undefined) {
if (!(validate87(data.columns, {
if (!(validate88(data.columns, {
instancePath: instancePath + "/columns",

@@ -1505,3 +1798,3 @@ parentData: data,

}))) {
vErrors = vErrors === null ? validate87.errors : vErrors.concat(validate87.errors);
vErrors = vErrors === null ? validate88.errors : vErrors.concat(validate88.errors);
errors = vErrors.length;

@@ -1511,3 +1804,3 @@ }

if (data.columnDefault !== undefined) {
if (!(validate90(data.columnDefault, {
if (!(validate92(data.columnDefault, {
instancePath: instancePath + "/columnDefault",

@@ -1518,3 +1811,3 @@ parentData: data,

}))) {
vErrors = vErrors === null ? validate90.errors : vErrors.concat(validate90.errors);
vErrors = vErrors === null ? validate92.errors : vErrors.concat(validate92.errors);
errors = vErrors.length;

@@ -1581,4 +1874,4 @@ }

}
validate69.errors = vErrors;
validate70.errors = vErrors;
return errors === 0;
}

@@ -93,3 +93,3 @@ {

},
"version": "6.3.4"
"version": "6.4.0"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc