Created
January 17, 2017 09:40
-
-
Save danielpetrov/340e830cc68c78f762d6f967c509bac7 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
| //not pointfree because we mention the data: word | |
| const snakeCase = word => word.toLowerCase().replace(/\s+/ig, '_') | |
| //pointfree | |
| const snakeCase = compose(replace(/\s+/ig, '_'), toLowerCase) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment