Created
December 5, 2018 22:23
-
-
Save jrsinclair/fdd3a09fa66f223fecb9da3353b7bc76 to your computer and use it in GitHub Desktop.
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); | |
const processRowsA = liftA2(processRows); | |
const messagesArr = processRowsA(headerFields, dataRows); | |
return either(showError, showMessages, messagesArr); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment