Created
November 9, 2010 20:04
-
-
Save philogb/669718 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
add : function(key, o){ | |
if(arguments.length == 1){ | |
o = key; | |
key = this.getKey(o); | |
debugger; | |
} | |
if(typeof key != 'undefined' && key !== null){ | |
var old = this.map[key]; | |
if(typeof old != 'undefined'){ | |
return this.replace(key, o); | |
} | |
this.map[key] = o; | |
} | |
this.length++; | |
this.items.push(o); | |
this.keys.push(key); | |
this.fireEvent('add', this.length-1, o, key); | |
return o; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment