All Downloads are FREE. Search and download functionalities are using the official Maven repository.

node_modules.lodash._castFunction.js Maven / Gradle / Ivy

There is a newer version: 3.3.1
Show newest version
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;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy