Maybe something like http://gist.github.com/229188 would be enough.

On Nov 7, 12:57 am, John Resig <jere...@gmail.com> wrote:
> Yehuda was working through that code and didn't get a chance to finish
> it up. Yehuda, any thoughts?
>
> --John
>
> On Sat, Nov 7, 2009 at 12:05 AM, lrbabe <lrb...@gmail.com> wrote:
> > In the current implementation of jQuery.extend we can find the
> > following code:
>
> > // Recurse if we're merging object values
> > if ( deep && copy && typeof copy === "object" && !copy.nodeType ) {
> >        var clone;
>
> >        if ( src ) {
> >                clone = src;
> >        } else if ( jQuery.isArray(copy) ) {
> >                clone = [];
> >        } else if ( jQuery.isObject(copy) ) {
> >                clone = {};
> >        } else {
> >                clone = copy;
> >        }
>
> >        // Never move original objects, clone them
> >        target[ name ] = jQuery.extend( deep, clone, copy );
> > }
>
> > If the first test passes, we know that copy is of type object. So what
> > is this jQuery.isObject exactly supposed to test?
> > It's probably meant to be more precise than the first test, excluding
> > objects such as "new Date()". What is strange is that the current
> > implementation of isObject always returns false (and seems therefore
> > useless, as suggested inhttp://dev.jquery.com/ticket/4946) without
> > causing any test to fail, while replacing its code with
> > function( obj ) {
> > return Object.prototype.toString.call( obj );
> > }
> > will cause one test to fail (test 10 with custom objects)...
>
> > Could someone light me up?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "jQuery Development" group.
> > To post to this group, send email to jquery-...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > jquery-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/jquery-dev?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to