Version 1
[yaffs-website] / node_modules / grunt-legacy-log / node_modules / lodash / internal / cachePush.js
diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/internal/cachePush.js b/node_modules/grunt-legacy-log/node_modules/lodash/internal/cachePush.js
new file mode 100644 (file)
index 0000000..ba03a15
--- /dev/null
@@ -0,0 +1,20 @@
+var isObject = require('../lang/isObject');
+
+/**
+ * Adds `value` to the cache.
+ *
+ * @private
+ * @name push
+ * @memberOf SetCache
+ * @param {*} value The value to cache.
+ */
+function cachePush(value) {
+  var data = this.data;
+  if (typeof value == 'string' || isObject(value)) {
+    data.set.add(value);
+  } else {
+    data.hash[value] = true;
+  }
+}
+
+module.exports = cachePush;