What is is-arrayish?
The is-arrayish npm package is used to determine if a value is array-like, meaning it can be iterated over like an array. This can include actual arrays, array-like objects (such as arguments or NodeList objects), or objects with a length property that are not functions.
Check if a value is array-like
This feature allows you to check if a given value is array-like. It returns true for actual arrays, array-like objects, and objects with a length property that are not functions. It returns false for other types of values, such as strings or functions.
var isArrayish = require('is-arrayish');
console.log(isArrayish([])); // true
console.log(isArrayish({ length: 1, 0: 'a' })); // true
console.log(isArrayish('string')); // false
console.log(isArrayish(function(){})); // false