MCPcopy
hub / github.com/jashkenas/underscore / baseIteratee

Function baseIteratee

underscore-node-f.cjs:760–765  ·  view source on GitHub ↗
(value, context, argCount)

Source from the content-addressed store, hash-verified

758// element in a collection, returning the desired result — either `_.identity`,
759// an arbitrary callback, a property matcher, or a property accessor.
760function baseIteratee(value, context, argCount) {
761 if (value == null) return identity;
762 if (isFunction$1(value)) return optimizeCb(value, context, argCount);
763 if (isObject(value) && !isArray(value)) return matcher(value);
764 return property(value);
765}
766
767// External wrapper for our callback generator. Users may customize
768// `_.iteratee` if they want additional predicate/iteratee shorthand styles.

Callers 2

iterateeFunction · 0.70
cbFunction · 0.70

Calls 4

optimizeCbFunction · 0.70
isObjectFunction · 0.70
matcherFunction · 0.70
propertyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…