UNPKG

async.util.isarraylike

Version:

async isarraylikehelper method as module.

13 lines (10 loc) 293 B
'use strict'; var isArray = require('async.util.isarray'); module.exports = function isArrayLike(arr) { return isArray(arr) || ( // has a positive integer length property typeof arr.length === 'number' && arr.length >= 0 && arr.length % 1 === 0 ); };