Created
December 5, 2018 22:07
-
-
Save jrsinclair/fe027c031f4f6077069dcfdd3cd02e20 to your computer and use it in GitHub Desktop.
Elegant Error Handling Code Samples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function csvToMessages(csvData) { | |
const csvRows = splitCSVToRows(csvData); | |
const headerFields = csvRows.map(_.head).map(splitFields); | |
const dataRows = csvRows.map(_.tail); | |
// How will we pass headerFields and dataRows to | |
// processRows() ? | |
const funcInEither = headerFields.map(processRows); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment