(rowData)
| 61 | } |
| 62 | |
| 63 | parseRow(rowData) { |
| 64 | const row = { ...this._prebuiltEmptyResultObject } |
| 65 | for (let i = 0, len = rowData.length; i < len; i++) { |
| 66 | const rawValue = rowData[i] |
| 67 | const field = this.fields[i].name |
| 68 | if (rawValue !== null) { |
| 69 | const v = this.fields[i].format === 'binary' ? Buffer.from(rawValue) : rawValue |
| 70 | row[field] = this._parsers[i](v) |
| 71 | } else { |
| 72 | row[field] = null |
| 73 | } |
| 74 | } |
| 75 | return row |
| 76 | } |
| 77 | |
| 78 | addRow(row) { |
| 79 | this.rows.push(row) |
no outgoing calls
no test coverage detected