1 var identity = require('./identity');
4 * Casts `value` to `identity` if it's not a function.
7 * @param {*} value The value to inspect.
8 * @returns {Function} Returns cast function.
10 function castFunction(value) {
11 return typeof value == 'function' ? value : identity;
14 module.exports = castFunction;