Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / internal / cachePush.js
1 var isObject = require('../lang/isObject');
2
3 /**
4  * Adds `value` to the cache.
5  *
6  * @private
7  * @name push
8  * @memberOf SetCache
9  * @param {*} value The value to cache.
10  */
11 function cachePush(value) {
12   var data = this.data;
13   if (typeof value == 'string' || isObject(value)) {
14     data.set.add(value);
15   } else {
16     data.hash[value] = true;
17   }
18 }
19
20 module.exports = cachePush;