Last active
May 25, 2018 22:42
-
-
Save TaylorAckley/32e605d78d254ee5fbcc9387cacf00b0 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
const strToEval = '/hello' | |
const eval = (arg) => { | |
switch(arg.charAt(0)) { | |
case '\'': | |
// handle single quote | |
break; | |
case ' ': | |
// handle space | |
break: | |
default: | |
// throw an error or assume thats its double quote | |
break; | |
} | |
} |
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
const program = () => { | |
router() | |
} | |
const router = (user) => { | |
if(typeof user !== String) { | |
handler(user); | |
} else { | |
user.each(x => { | |
handler(x); | |
}) | |
} | |
} | |
const handler = (..args) { | |
// Do stuff! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment