Created
November 7, 2018 18:03
-
-
Save maciejcieslar/35583d2e55f541d821bd4b23ff4f132f to your computer and use it in GitHub Desktop.
This file contains 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
const parsers = { | |
int: (number: string) => parseInt(number, 10), | |
float: (number: string) => parseFloat(number), | |
list: (val: string) => val.split(','), | |
collect: (val, memo) => { | |
memo.push(val) | |
return memo | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment