diff options
Diffstat (limited to 'tools/eslint/node_modules/lodash/_toFunction.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/_toFunction.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/lodash/_toFunction.js b/tools/eslint/node_modules/lodash/_toFunction.js new file mode 100644 index 0000000000..4fa85d1716 --- /dev/null +++ b/tools/eslint/node_modules/lodash/_toFunction.js @@ -0,0 +1,14 @@ +var identity = require('./identity'); + +/** + * Converts `value` to a function if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Function} Returns the function. + */ +function toFunction(value) { + return typeof value == 'function' ? value : identity; +} + +module.exports = toFunction; |