source: trip-planner-front/node_modules/lodash/_castFunction.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 326 bytes
Line 
1var identity = require('./identity');
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
14module.exports = castFunction;
Note: See TracBrowser for help on using the repository browser.