12 lines
242 B
JavaScript
12 lines
242 B
JavaScript
module.exports = {
|
|
|
|
isArray: function(value) {
|
|
if (Array.isArray) {
|
|
return Array.isArray(value);
|
|
}
|
|
// fallback for older browsers like IE 8
|
|
return Object.prototype.toString.call( value ) === '[object Array]';
|
|
}
|
|
|
|
};
|