mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 15:27:50 +00:00
17 lines
472 B
JavaScript
17 lines
472 B
JavaScript
import isArray from './isArray.js';
|
|
import isFunction from './isFunction.js';
|
|
|
|
/**
|
|
* Checks if `value` is a flattenable array and not a `_.matchesProperty`
|
|
* iteratee shorthand.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
*/
|
|
function isFlattenableIteratee(value) {
|
|
return isArray(value) && !(value.length == 2 && !isFunction(value[0]));
|
|
}
|
|
|
|
export default isFlattenableIteratee;
|