Created
April 15, 2013 21:58
-
-
Save cristiandouce/5391608 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
Option.prototype.getOption = function(setting) { | |
var ref = this; | |
setting = setting.split('.'); | |
while (setting.length) { | |
if(!(ref = ref[setting.shift()])) break; | |
} | |
return ref; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
works with something like this