function unapply(func) {
    return function (thisArg) {
      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }
      return apply(func, thisArg, args);
    };
  }
Creates a new function that calls the given function with a specified thisArg and arguments.

@param func - The function to be wrapped and called.
@returns A new function that calls the given function with a specified thisArg and arguments.