* Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `t
(func, bitmask, thisArg)
| 5014 | * @returns {Function} Returns the new wrapped function. |
| 5015 | */ |
| 5016 | function createBind(func, bitmask, thisArg) { |
| 5017 | var isBind = bitmask & WRAP_BIND_FLAG, |
| 5018 | Ctor = createCtor(func); |
| 5019 | |
| 5020 | function wrapper() { |
| 5021 | var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; |
| 5022 | return fn.apply(isBind ? thisArg : this, arguments); |
| 5023 | } |
| 5024 | return wrapper; |
| 5025 | } |
| 5026 | |
| 5027 | /** |
| 5028 | * Creates a function like `_.lowerFirst`. |
no test coverage detected