DIR: /proc/1991111/cwd/usr/share/nodejs/lodash-es/ |
Current File : //proc/1991111/cwd/usr/share/nodejs/lodash-es/_castFunction.js |
import identity from './identity.js'; /** Detect free variable `globalThis` */ const freeGlobalThis = typeof globalThis == 'object' && globalThis !== null && globalThis.Object == Object && globalThis; /** * 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; } export default castFunction; |