|
@ -426,7 +426,7 @@ exports.getType = function(object) { |
|
|
if (object instanceof String) { |
|
|
if (object instanceof String) { |
|
|
return 'String'; |
|
|
return 'String'; |
|
|
} |
|
|
} |
|
|
if (object instanceof Array) { |
|
|
|
|
|
|
|
|
if (Array.isArray(object)) { |
|
|
return 'Array'; |
|
|
return 'Array'; |
|
|
} |
|
|
} |
|
|
if (object instanceof Date) { |
|
|
if (object instanceof Date) { |
|
@ -506,7 +506,7 @@ exports.removeClassName = function(elem, className) { |
|
|
exports.forEach = function(object, callback) { |
|
|
exports.forEach = function(object, callback) { |
|
|
var i, |
|
|
var i, |
|
|
len; |
|
|
len; |
|
|
if (object instanceof Array) { |
|
|
|
|
|
|
|
|
if (Array.isArray(object)) { |
|
|
// array
|
|
|
// array
|
|
|
for (i = 0, len = object.length; i < len; i++) { |
|
|
for (i = 0, len = object.length; i < len; i++) { |
|
|
callback(object[i], i, object); |
|
|
callback(object[i], i, object); |
|
|