Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / constant.js
diff --git a/node_modules/uncss/node_modules/lodash/constant.js b/node_modules/uncss/node_modules/lodash/constant.js
new file mode 100644 (file)
index 0000000..5844804
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * Creates a function that returns `value`.
+ *
+ * @static
+ * @memberOf _
+ * @category Util
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var getter = _.constant(object);
+ *
+ * getter() === object;
+ * // => true
+ */
+function constant(value) {
+  return function() {
+    return value;
+  };
+}
+
+module.exports = constant;