Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove dependency on jQuery.isArray.

  • Loading branch information...
commit 142e7e813eef6b1f800c2a46693b730f08103658 1 parent 45421e7
@tobie tobie authored Dave Reed committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 jquery.glob.js
View
9 jquery.glob.js
@@ -19,7 +19,7 @@ $.extend({
else {
var lang,
cultures = $.cultures,
- list = $.isArray( name ) ? name : name.split( ',' ),
+ list = isArray( name ) ? name : name.split( ',' ),
i, l = list.length,
prioritized = [];
for ( i = 0; i < l; i++ ) {
@@ -425,7 +425,8 @@ en.calendar = en.calendar || en.calendars.standard;
var regexTrim = /^\s+|\s+$/g,
regexInfinity = /^[+-]?infinity$/i,
regexHex = /^0x[a-f0-9]+$/i,
- regexParseFloat = /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;
+ regexParseFloat = /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,
+ toString = Object.prototype.toString;
function startsWith(value, pattern) {
return value.indexOf( pattern ) === 0;
@@ -446,6 +447,10 @@ function zeroPad(str, count, left) {
return str;
}
+function isArray(obj) {
+ return toString.call(obj) === "[object Array]";
+}
+
// *************************************** Numbers ***************************************
function expandNumber(number, precision, formatInfo) {
Please sign in to comment.
Something went wrong with that request. Please try again.