(
condition: IIndexedRowElement | undefined,
rowIndex: number
)
| 92 | } |
| 93 | |
| 94 | export function ifRowIndex( |
| 95 | condition: IIndexedRowElement | undefined, |
| 96 | rowIndex: number |
| 97 | ) { |
| 98 | if (!condition || condition.row_index === undefined) { |
| 99 | return true; |
| 100 | } |
| 101 | |
| 102 | const rowCondition = condition.row_index; |
| 103 | return typeof rowCondition === 'string' |
| 104 | ? rowIndex % 2 === (rowCondition === 'odd' ? 1 : 0) |
| 105 | : Array.isArray(rowCondition) |
| 106 | ? R.includes(rowIndex, rowCondition) |
| 107 | : rowIndex === rowCondition; |
| 108 | } |
| 109 | |
| 110 | export function ifHeaderIndex( |
| 111 | condition: IIndexedHeaderElement | undefined, |
no outgoing calls
no test coverage detected
searching dependent graphs…