Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / toFunction.js
diff --git a/node_modules/uncss/node_modules/lodash/internal/toFunction.js b/node_modules/uncss/node_modules/lodash/internal/toFunction.js
new file mode 100644 (file)
index 0000000..0879dfe
--- /dev/null
@@ -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;