ramda-adjunct
Version:
Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.
23 lines (21 loc) • 729 B
Plain Text
/**
* Tests whether or not an object is similar to an array.
*
* @func isArrayLike
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/1.9.0|v1.9.0}
* @licence https://github.com/ramda/ramda/blob/master/LICENSE.txt
* @category List
* @category Type
* @sig * -> Boolean
* @param {*} val The value to test
* @returns {boolean} `true` if `val` has a numeric length property and extreme indices defined; `false` otherwise.
* @see {@link RA.isNotArrayLike|isNotArrayLike}
* @example
*
* RA.isArrayLike([]); //=> true
* RA.isArrayLike(true); //=> false
* RA.isArrayLike({}); //=> false
* RA.isArrayLike({length: 10}); //=> false
* RA.isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
*/