Files
lodash/_baseCastFunction.js
John-David Dalton ce259221bd Bump to v4.4.0.
2016-02-15 20:20:54 -08:00

16 lines
361 B
JavaScript

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;
});