Created
September 6, 2016 00:50
-
-
Save ericelliott/41149cf676c23b959caa53960a3d70f3 to your computer and use it in GitHub Desktop.
Using pipe()
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 toSlug = pipe( | |
split(' '), | |
map(toLowerCase), | |
join('-'), | |
encodeURIComponent | |
); | |
console.log(toSlug('JS Cheerleader')); // 'js-cheerleader' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment