function castRearg(name, func, n) {
    return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
      ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
      : func;
  }
Casts `func` to an rearged function if needed.

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