Files
lodash/_baseCastFunction.js
John-David Dalton 94ba2e24e8 Bump to v4.4.0.
2016-02-15 20:25:07 -08:00

15 lines
334 B
JavaScript

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;