source: imaps-frontend/node_modules/lodash-es/_castFunction.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 324 bytes
RevLine 
[d565449]1import identity from './identity.js';
2
3/**
4 * Casts `value` to `identity` if it's not a function.
5 *
6 * @private
7 * @param {*} value The value to inspect.
8 * @returns {Function} Returns cast function.
9 */
10function castFunction(value) {
11 return typeof value == 'function' ? value : identity;
12}
13
14export default castFunction;
Note: See TracBrowser for help on using the repository browser.