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,14 +1,23 @@
import Map from './Map';
import assocGet from './assocGet';
import hashGet from './hashGet';
import isKeyable from './isKeyable';
/**
* Gets the cached value for `key`.
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf _.memoize.Cache
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the cached value.
* @returns {*} Returns the entry value.
*/
function mapGet(key) {
return key == '__proto__' ? undefined : this.__data__[key];
var data = this.__data__;
if (isKeyable(key)) {
return hashGet(typeof key == 'string' ? data.string : data.hash, key);
}
return Map ? data.map.get(key) : assocGet(data.map, key);
}
export default mapGet;