(header = this._getUnionNames())
| 16356 | return types |
| 16357 | } |
| 16358 | toDataTable(header = this._getUnionNames()) { |
| 16359 | const types = this._getTypes(header) |
| 16360 | const parsers = { |
| 16361 | string: str => str, |
| 16362 | float: parseFloat, |
| 16363 | int: parseInt |
| 16364 | } |
| 16365 | const atomFn = (atomValue, rowIndex, columnIndex) => (rowIndex ? parsers[types[columnIndex]](atomValue) : atomValue) |
| 16366 | const arrays = this._toArrays(header, atomFn) |
| 16367 | arrays.rows.unshift(arrays.header) |
| 16368 | return arrays.rows |
| 16369 | } |
| 16370 | toDelimited(delimiter, header = this._getUnionNames(), escapeSpecialChars = true) { |
| 16371 | const regex = new RegExp(`(\\n|\\"|\\${delimiter})`) |
| 16372 | const atomFn = (str, row, column) => (!str.toString().match(regex) ? str : `"` + str.replace(/\"/g, `""`) + `"`) |
nothing calls this directly
no test coverage detected