Skip to content

Instantly share code, notes, and snippets.

@masaeedu
Last active June 7, 2018 14:34
Show Gist options
  • Save masaeedu/139238c2fcd3ae64a973452a70193b28 to your computer and use it in GitHub Desktop.
Save masaeedu/139238c2fcd3ae64a973452a70193b28 to your computer and use it in GitHub Desktop.
mysillypackage
const sillify = input => input
.split("")
.map((c, i) => i % 2 === 0 ? c.toLowerCase() : c.toUpperCase())
.reduce((p, c) => p + c)
module.exports = { sillify }
{
"name": "mysillypackage",
"version": "0.3.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment