2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-13 08:52:25 +03:00
Files
vue-meta/src/shared/isArray.js
T
2019-02-09 21:45:22 +01:00

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]'
}