Closed i8ramin closed 12 years ago
My only beef with this addition is that it adds another ~200 bytes to the minified code...
Is the two-argument functionality something that would be used somewhat? I would love to hear input from anyone else keeping tabs on this project...
We use this functionality a lot in our code base, to extend regular "non-xui" objects. Like extending a set of default properties with a passed in one. At first I created a $.fn.extendObj() function, but then realized that we could simply use the existing $.fn.extend and make it a bit smarter (jquery also does this) - we can remove the "deep cloning" feature and cut down on the size a bit, but I personally feel like it is a useful feature to have.
Doesn't look like there's much of a need for this. I think it's safer to keep the codebase small.
XUI's base extend function only extends the xui prototype. With this new functionality, if more 2 objects are passed in, then the first object is extended with the properties of the 2nd object. This also does a Deep Copy.