Skip to content

Instantly share code, notes, and snippets.

@frenchbread
Created November 27, 2015 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frenchbread/a17d4344e55b9d21722d to your computer and use it in GitHub Desktop.
Save frenchbread/a17d4344e55b9d21722d to your computer and use it in GitHub Desktop.
function getCalledMethod(text, commandsList){
for (var key in commandsList) {
if (commandsList.hasOwnProperty(key)) {
//console.log(key + " -> " + commandsList[key]);
if (S(text).contains("/" + key)){
return commandsList[key];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment