* A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The ar
(func, thisArg, args)
| 484 | * @returns {*} Returns the result of `func`. |
| 485 | */ |
| 486 | function apply(func, thisArg, args) { |
| 487 | switch (args.length) { |
| 488 | case 0: return func.call(thisArg); |
| 489 | case 1: return func.call(thisArg, args[0]); |
| 490 | case 2: return func.call(thisArg, args[0], args[1]); |
| 491 | case 3: return func.call(thisArg, args[0], args[1], args[2]); |
| 492 | } |
| 493 | return func.apply(thisArg, args); |
| 494 | } |
| 495 | |
| 496 | /** |
| 497 | * A specialized version of `baseAggregator` for arrays. |
no outgoing calls
no test coverage detected