mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-13 08:52:25 +03:00
11 lines
294 B
JavaScript
11 lines
294 B
JavaScript
/**
|
|
* checks if passed argument is an array
|
|
* @param {any} arr - the object to check
|
|
* @return {Boolean} - true if `arr` is an array
|
|
*/
|
|
export default function isArray(arr) {
|
|
return Array.isArray
|
|
? Array.isArray(arr)
|
|
: Object.prototype.toString.call(arr) === '[object Array]'
|
|
}
|