Files
lodash/_baseCastFunction.js
John-David Dalton 91d3468c81 Bump to v4.4.0.
2016-02-15 23:05:17 -08:00

15 lines
339 B
JavaScript

var identity = require('./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;
}
module.exports = baseCastFunction;