Created
December 19, 2013 02:29
-
-
Save sjmiles/8033424 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
explodeObservers: function(prototype) { | |
// called before prototype.observe is chained to inherited object | |
var o = prototype.observe; | |
if (o) { | |
var exploded = {}; | |
for (var n in o) { | |
var names = n.split(' '); | |
for (var i=0, ni; ni=names[i]; i++) { | |
exploded[ni] = o[n]; | |
} | |
} | |
prototype.observe = exploded; | |
//console.log(o, exploded); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment