mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v3.0.0.
This commit is contained in:
21
internal/cachePush.js
Normal file
21
internal/cachePush.js
Normal file
@@ -0,0 +1,21 @@
|
||||
define(['../lang/isObject'], function(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;
|
||||
}
|
||||
}
|
||||
|
||||
return cachePush;
|
||||
});
|
||||
Reference in New Issue
Block a user