Created
November 27, 2015 05:17
-
-
Save frenchbread/a17d4344e55b9d21722d 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
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