Version 1
[yaffs-website] / node_modules / grunt-uncss / node_modules / lodash / _castFunction.js
diff --git a/node_modules/grunt-uncss/node_modules/lodash/_castFunction.js b/node_modules/grunt-uncss/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;