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