summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/_isFlattenableIteratee.js
blob: f7ede3e22a12cd4906ebc48816f3915fbe69d036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;