mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-24 18:50:34 +03:00
refactor: let transpiler fix Array.isArray
This commit is contained in:
committed by
Alexander Lichter
parent
34c534be82
commit
93fb900a85
@@ -1,12 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* checks if passed argument is an array
|
* checks if passed argument is an array
|
||||||
* @param {any} arr - the object to check
|
* @param {any} arg - the object to check
|
||||||
* @return {Boolean} - true if `arr` is an array
|
* @return {Boolean} - true if `arg` is an array
|
||||||
*/
|
*/
|
||||||
export function isArray(arr) {
|
export function isArray(arg) {
|
||||||
return Array.isArray
|
return Array.isArray(arg)
|
||||||
? Array.isArray(arr)
|
|
||||||
: Object.prototype.toString.call(arr) === '[object Array]'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isUndefined(arg) {
|
export function isUndefined(arg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user