Last active
September 30, 2015 23:07
-
-
Save poteto/9b3fed724b8bedd8342b 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 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