'use strict';

// MODULES //

var isInteger = require( '@stdlib/utils/is-integer' );


// CONSTANTS //

var MAX = require( '@stdlib/math/constants/float64-max-safe-integer' );


// IS ARRAY-LIKE //

/**
* FUNCTION: isArrayLike( value )
*	Tests if a value is array-like.
*
* @param {*} value - value to test
* @param {Boolean} boolean indicating if a value is array-like
*/
function isArrayLike( value ) {
	return (
		value !== void 0 &&
		value !== null &&
		typeof value !== 'function' &&
		isInteger( value.length ) &&
		value.length >= 0 &&
		value.length <= MAX
	);
} // end FUNCTION isArrayLike()


// EXPORTS //

module.exports = isArrayLike;

'use strict';

// MODULES //

var isInteger = require( '@stdlib/utils/is-integer' );


// CONSTANTS //

var MAX = require( '@stdlib/math/constants/uint32-max' );


// IS ARRAY-LIKE //

/**
* FUNCTION: isArrayLike( value )
*	Tests if a value is array-like.
*
* @param {*} value - value to test
* @param {Boolean} boolean indicating if a value is array-like
*/
function isArrayLike( value ) {
	return (
		value !== void 0 &&
		value !== null &&
		typeof value !== 'function' &&
		isInteger( value.length ) &&
		value.length >= 0 &&
		value.length <= MAX
	);
} // end FUNCTION isArrayLike()


// EXPORTS //

module.exports = isArrayLike;

Fix array-like check for max length value
Fix array-like check for max length value
