12345678910111213141516171819202122232425262728293031 |
- import baseMatches from './_baseMatches.js';
- import baseMatchesProperty from './_baseMatchesProperty.js';
- import identity from './identity.js';
- import isArray from './isArray.js';
- import property from './property.js';
- function baseIteratee(value) {
-
-
- if (typeof value == 'function') {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (typeof value == 'object') {
- return isArray(value)
- ? baseMatchesProperty(value[0], value[1])
- : baseMatches(value);
- }
- return property(value);
- }
- export default baseIteratee;
|