mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Bump to v4.4.0.
This commit is contained in:
14
_baseCastFunction.js
Normal file
14
_baseCastFunction.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import identity from './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;
|
||||
}
|
||||
|
||||
export default baseCastFunction;
|
||||
Reference in New Issue
Block a user