From: John Resig Date: Fri, 27 Aug 2010 17:15:48 +0000 (-0400) Subject: Use the native isArray whenever possible. See perf test by jdalton here: http://jsper... X-Git-Tag: 1.4.3rc1~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea8b1584b1905bbb414dc2e3cf562c6f3904bd97;p=jquery.git Use the native isArray whenever possible. See perf test by jdalton here: http://jsperf.com/isarray-vs-other Fixes #6825. --- diff --git a/src/core.js b/src/core.js index d4a0e61bb..6e1f74520 100644 --- a/src/core.js +++ b/src/core.js @@ -441,7 +441,7 @@ jQuery.extend({ return jQuery.type(obj) === "function"; }, - isArray: function( obj ) { + isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; },