Skip to content

Instantly share code, notes, and snippets.

@arturparkhisenko
Forked from ericelliott/using-pipe.js
Created September 6, 2016 06:31
Show Gist options
  • Save arturparkhisenko/3e11d255641259bbceda106cc6107e69 to your computer and use it in GitHub Desktop.
Save arturparkhisenko/3e11d255641259bbceda106cc6107e69 to your computer and use it in GitHub Desktop.
Using pipe()
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