mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
474 B
17 lines
474 B
9 years ago
|
var isArray = require('./isArray'),
|
||
|
isFunction = require('./isFunction');
|
||
|
|
||
|
/**
|
||
|
* 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]));
|
||
|
}
|
||
|
|
||
|
module.exports = isFlattenableIteratee;
|