-
-
Save greyhwndz/bb64bfc2406ba260799a to your computer and use it in GitHub Desktop.
This file contains 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 MESSAGES = { | |
400(foo) { | |
// stuff | |
}, | |
404(foo) { | |
// stuff | |
}, | |
500(foo) { | |
// stuff | |
} | |
}; | |
function blah(statusCode, foo) { | |
return MESSAGES[statusCode](foo) || '¯\\_(ツ)_/¯'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment