Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-09-17 17:52:09 -07:00
parent 1d77dfa4b7
commit 54e7baecc3
675 changed files with 11257 additions and 8085 deletions

View File

@@ -1,21 +1,28 @@
import mapClear from './mapClear';
import mapDelete from './mapDelete';
import mapGet from './mapGet';
import mapHas from './mapHas';
import mapSet from './mapSet';
/**
* Creates a cache object to store key/value pairs.
* Creates a map cache object to store key-value pairs.
*
* @private
* @static
* @name Cache
* @memberOf _.memoize
* @param {Array} [values] The values to cache.
*/
function MapCache() {
this.__data__ = {};
function MapCache(values) {
var index = -1,
length = values ? values.length : 0;
this.clear();
while (++index < length) {
var entry = values[index];
this.set(entry[0], entry[1]);
}
}
// Add functions to the `Map` cache.
// Add functions to the `MapCache`.
MapCache.prototype.clear = mapClear;
MapCache.prototype['delete'] = mapDelete;
MapCache.prototype.get = mapGet;
MapCache.prototype.has = mapHas;