Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / lodash / _castFunction.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/lodash/_castFunction.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/lodash/_castFunction.js
new file mode 100644 (file)
index 0000000..98c91ae
--- /dev/null
@@ -0,0 +1,14 @@
+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;