function baseCallback(func, thisArg, argCount) {
      var type = typeof func;

      if (type == 'function') {
        if (typeof thisArg == 'undefined') {
          return func;
        }
        var data = getData(func);
        if (typeof data == 'undefined') {
          var support = lodash.support;
          if (support.funcNames) {
            data = !func.name;
          }
          data = data || !support.funcDecomp;
          if (!data) {
            var source = fnToString.call(func);
            if (!support.funcNames) {
              data = !reFuncName.test(source);
            }
            if (!data) {
              // checks if `func` references the `this` keyword and stores the result
              data = reThis.test(source) || isNative(func);
              baseSetData(func, data);
            }
          }
        }
        // exit early if there are no `this` references or `func` is bound
        if (data === false || (data !== true && data[1] & BIND_FLAG)) {
          return func;
        }
        switch (argCount) {
          case 1: return function(value) {
            return func.call(thisArg, value);
          };
          case 3: return function(value, index, collection) {
            return func.call(thisArg, value, index, collection);
          };
          case 4: return function(accumulator, value, index, collection) {
            return func.call(thisArg, accumulator, value, index, collection);
          };
          case 5: return function(value, other, key, object, source) {
            return func.call(thisArg, value, other, key, object, source);
          };
        }
        return function() {
          return func.apply(thisArg, arguments);
        };
      }
      if (func == null) {
        return identity;
      }
      // handle "_.pluck" and "_.where" style callback shorthands
      return type == 'object' ? matches(func) : property(func);
    }
The base implementation of `_.callback` without support for creating
"_.pluck" and "_.where" style callbacks.

@private
@param {*} [func=_.identity] The value to convert to a callback.
@param {*} [thisArg] The `this` binding of the created callback.
@param {number} [argCount] The number of arguments the callback accepts.
@returns {Function} Returns the new function.