* The base implementation of `_.callback` which supports specifying the * number of arguments to provide to `func`. * * @private * @param {*} [func=_.identity] The value to convert to a callback. * @param {*} [thisArg] The `this` binding of `func`. * @param {number} [ar
(func, thisArg, argCount)
| 3209 | * @returns {Function} Returns the callback. |
| 3210 | */ |
| 3211 | function baseCallback(func, thisArg, argCount) { |
| 3212 | var type = typeof func; |
| 3213 | if (type == 'function') { |
| 3214 | return thisArg === undefined |
| 3215 | ? func |
| 3216 | : bindCallback(func, thisArg, argCount); |
| 3217 | } |
| 3218 | if (func == null) { |
| 3219 | return identity; |
| 3220 | } |
| 3221 | if (type == 'object') { |
| 3222 | return baseMatches(func); |
| 3223 | } |
| 3224 | return thisArg === undefined |
| 3225 | ? property(func) |
| 3226 | : baseMatchesProperty(func, thisArg); |
| 3227 | } |
| 3228 | |
| 3229 | /** |
| 3230 | * The base implementation of `_.clone` without support for argument juggling |
no test coverage detected