Skip to content

Instantly share code, notes, and snippets.

@TaylorAckley
Last active May 25, 2018 22:42
Show Gist options
  • Save TaylorAckley/32e605d78d254ee5fbcc9387cacf00b0 to your computer and use it in GitHub Desktop.
Save TaylorAckley/32e605d78d254ee5fbcc9387cacf00b0 to your computer and use it in GitHub Desktop.
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;
}
}
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