mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-17 03:40:33 +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
|
||||
* @param {any} arr - the object to check
|
||||
* @return {Boolean} - true if `arr` is an array
|
||||
* @param {any} arg - the object to check
|
||||
* @return {Boolean} - true if `arg` is an array
|
||||
*/
|
||||
export function isArray(arr) {
|
||||
return Array.isArray
|
||||
? Array.isArray(arr)
|
||||
: Object.prototype.toString.call(arr) === '[object Array]'
|
||||
export function isArray(arg) {
|
||||
return Array.isArray(arg)
|
||||
}
|
||||
|
||||
export function isUndefined(arg) {
|
||||
|
||||
Reference in New Issue
Block a user