calculateTableWidth(table) {
        const firstRow = table.toString().split('\n')[0];

        return stripAnsi(firstRow).length;
    }
Calculate the width of the CLI Table

`table.width` does not report the correct width
because it includes ANSI control characters

@internal
@param {import("cli-table3").Table} table