Musique/node_modules/async.util.isarraylike/index.js

13 lines
293 B
JavaScript
Raw Normal View History

'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
);
};