summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js')
-rw-r--r--deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js
new file mode 100644
index 0000000000..ba03a1528a
--- /dev/null
+++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js
@@ -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;