* Creates a function that wraps `func` and invokes it with the `this` * binding of `thisArg`. * * @private * @param {Function} func The function to bind. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new bound function.
(func, thisArg)
| 4668 | * @returns {Function} Returns the new bound function. |
| 4669 | */ |
| 4670 | function createBindWrapper(func, thisArg) { |
| 4671 | var Ctor = createCtorWrapper(func); |
| 4672 | |
| 4673 | function wrapper() { |
| 4674 | var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; |
| 4675 | return fn.apply(thisArg, arguments); |
| 4676 | } |
| 4677 | return wrapper; |
| 4678 | } |
| 4679 | |
| 4680 | /** |
| 4681 | * Creates a `Set` cache object to optimize linear searches of large arrays. |
no test coverage detected