mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
35
react-app/node_modules/lodash/internal/baseCallback.js
generated
vendored
Normal file
35
react-app/node_modules/lodash/internal/baseCallback.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
var baseMatches = require('./baseMatches'),
|
||||
baseMatchesProperty = require('./baseMatchesProperty'),
|
||||
bindCallback = require('./bindCallback'),
|
||||
identity = require('../utility/identity'),
|
||||
property = require('../utility/property');
|
||||
|
||||
/**
|
||||
* 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} [argCount] The number of arguments to provide to `func`.
|
||||
* @returns {Function} Returns the callback.
|
||||
*/
|
||||
function baseCallback(func, thisArg, argCount) {
|
||||
var type = typeof func;
|
||||
if (type == 'function') {
|
||||
return thisArg === undefined
|
||||
? func
|
||||
: bindCallback(func, thisArg, argCount);
|
||||
}
|
||||
if (func == null) {
|
||||
return identity;
|
||||
}
|
||||
if (type == 'object') {
|
||||
return baseMatches(func);
|
||||
}
|
||||
return thisArg === undefined
|
||||
? property(func)
|
||||
: baseMatchesProperty(func, thisArg);
|
||||
}
|
||||
|
||||
module.exports = baseCallback;
|
Reference in New Issue
Block a user