Update checked-in dependencies
This commit is contained in:
parent
6b0d45a5c6
commit
cc1adb825a
4247 changed files with 144820 additions and 149530 deletions
26
node_modules/table/dist/drawContent.js
generated
vendored
Normal file
26
node_modules/table/dist/drawContent.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.drawContent = void 0;
|
||||
/**
|
||||
* Shared function to draw horizontal borders, rows or the entire table
|
||||
*/
|
||||
const drawContent = (contents, separatorConfig) => {
|
||||
const { separatorGetter, drawSeparator } = separatorConfig;
|
||||
const contentSize = contents.length;
|
||||
const result = [];
|
||||
if (drawSeparator(0, contentSize)) {
|
||||
result.push(separatorGetter(0, contentSize));
|
||||
}
|
||||
contents.forEach((content, contentIndex) => {
|
||||
result.push(content);
|
||||
// Only append the middle separator if the content is not the last
|
||||
if (contentIndex + 1 < contentSize && drawSeparator(contentIndex + 1, contentSize)) {
|
||||
result.push(separatorGetter(contentIndex + 1, contentSize));
|
||||
}
|
||||
});
|
||||
if (drawSeparator(contentSize, contentSize)) {
|
||||
result.push(separatorGetter(contentSize, contentSize));
|
||||
}
|
||||
return result.join('');
|
||||
};
|
||||
exports.drawContent = drawContent;
|
||||
Loading…
Add table
Add a link
Reference in a new issue