mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Bump to v4.4.0.
This commit is contained in:
15
_baseCastFunction.js
Normal file
15
_baseCastFunction.js
Normal file
@@ -0,0 +1,15 @@
|
||||
define(['./identity'], function(identity) {
|
||||
|
||||
/**
|
||||
* Casts `value` to `identity` if it's not a function.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to inspect.
|
||||
* @returns {Array} Returns the array-like object.
|
||||
*/
|
||||
function baseCastFunction(value) {
|
||||
return typeof value == 'function' ? value : identity;
|
||||
}
|
||||
|
||||
return baseCastFunction;
|
||||
});
|
||||
Reference in New Issue
Block a user