( rows )
| 123 | } |
| 124 | |
| 125 | function findGamesHeaderRowIndex ( rows ) { |
| 126 | return rows.findIndex( row => row[ 0 ] === 'Games' && row[ 1 ] === 'Playable' ) |
| 127 | } |
| 128 | |
| 129 | function mapCsvRowToRecord ( headers, row ) { |
| 130 | return headers.reduce( ( record, header, index ) => { |