Skip to content

Instantly share code, notes, and snippets.

Created August 20, 2012 14:34
Show Gist options
  • Save anonymous/3404737 to your computer and use it in GitHub Desktop.
Save anonymous/3404737 to your computer and use it in GitHub Desktop.
Swithc alternate
var messagesHandler = {
message: function(message){
}
}
if (message.type in messagesHandler[message.type]) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment