90b1acc116ff6ba17449fef831b0437927e8f625ae72074b4723b8e5ce65e6123059382ceabde33b000e21dee18020ecf9a81645c54c479ead353dcef129b0 324 B

1234567891011121314
  1. import identity from './identity.js';
  2. /**
  3. * Casts `value` to `identity` if it's not a function.
  4. *
  5. * @private
  6. * @param {*} value The value to inspect.
  7. * @returns {Function} Returns cast function.
  8. */
  9. function castFunction(value) {
  10. return typeof value == 'function' ? value : identity;
  11. }
  12. export default castFunction;