Use the native isArray whenever possible. See perf test by jdalton here: http://jsper...
authorJohn Resig <jeresig@gmail.com>
Fri, 27 Aug 2010 17:15:48 +0000 (13:15 -0400)
committerJohn Resig <jeresig@gmail.com>
Fri, 27 Aug 2010 17:15:48 +0000 (13:15 -0400)
src/core.js

index d4a0e61..6e1f745 100644 (file)
@@ -441,7 +441,7 @@ jQuery.extend({
                return jQuery.type(obj) === "function";
        },
 
-       isArray: function( obj ) {
+       isArray: Array.isArray || function( obj ) {
                return jQuery.type(obj) === "array";
        },