function castCap(name, func) {
    if (config.cap) {
      var indexes = mapping.iterateeRearg[name];
      if (indexes) {
        return iterateeRearg(func, indexes);
      }
      var n = !isLib && mapping.iterateeAry[name];
      if (n) {
        return iterateeAry(func, n);
      }
    }
    return func;
  }
Casts `func` to a function with an arity capped iteratee if needed.

@private
@param {string} name The name of the function to inspect.
@param {Function} func The function to inspect.
@returns {Function} Returns the cast function.