Skip to content

Instantly share code, notes, and snippets.

@NoahDavidATL
Forked from ericelliott/nesting-composition.js
Last active August 28, 2017 13:32
Show Gist options
  • Save NoahDavidATL/0485dc1ce34d5b63095093652456c69b to your computer and use it in GitHub Desktop.
Save NoahDavidATL/0485dc1ce34d5b63095093652456c69b to your computer and use it in GitHub Desktop.
Nesting function composition
const toSlug = input => encodeURIComponent(join('-')(map(toLowerCase)(split(' ')(input))));
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