MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / baseCallback

Function baseCallback

lib/web/jshint.js:3211–3227  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 1

callbackFunction · 0.85

Calls 4

bindCallbackFunction · 0.85
baseMatchesFunction · 0.85
baseMatchesPropertyFunction · 0.85
propertyFunction · 0.70

Tested by

no test coverage detected