()
| 154 | } |
| 155 | |
| 156 | const toString = (): string => { |
| 157 | const border = { |
| 158 | topBody: '─', |
| 159 | topJoin: '', |
| 160 | topLeft: '', |
| 161 | topRight: '', |
| 162 | |
| 163 | bottomBody: '─', |
| 164 | bottomJoin: '', |
| 165 | bottomLeft: '', |
| 166 | bottomRight: '', |
| 167 | |
| 168 | bodyLeft: '', |
| 169 | bodyRight: '', |
| 170 | bodyJoin: '', |
| 171 | |
| 172 | joinBody: '─', |
| 173 | joinLeft: '', |
| 174 | joinRight: '', |
| 175 | joinJoin: '', |
| 176 | } |
| 177 | |
| 178 | const listDrawHorizontalLine = options.groupRows |
| 179 | ? (index: number) => index === 0 || index === data.length || (index - 1) % 5 === 0 |
| 180 | : (index: number) => index === 0 || index === data.length || index === 1 |
| 181 | const drawHorizontalLine = options.isList |
| 182 | ? listDrawHorizontalLine |
| 183 | : (index: number) => index === 0 || index === data.length |
| 184 | const config = { drawHorizontalLine, border } |
| 185 | return table(data, config) |
| 186 | } |
| 187 | |
| 188 | return { push, toString } |
| 189 | } |
nothing calls this directly
no outgoing calls
no test coverage detected