Urara-Blog/node_modules/.pnpm-store/v3/files/12/89b553ae957a14a0de27e83b54e3f01c97684128e4d303779428802c679f22e8e281209c9c061707ec4146597f8857f0a8b0b068699349a0569b6afeb82119
2022-08-14 01:14:53 +08:00

14 lines
326 B
Text

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