mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Bump to v4.12.0.
This commit is contained in:
18
_getMapData.js
Normal file
18
_getMapData.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import isKeyable from './_isKeyable';
|
||||
|
||||
/**
|
||||
* Gets the data for `map`.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} map The map to query.
|
||||
* @param {string} key The reference key.
|
||||
* @returns {*} Returns the map data.
|
||||
*/
|
||||
function getMapData(map, key) {
|
||||
var data = map.__data__;
|
||||
return isKeyable(key)
|
||||
? data[typeof key == 'string' ? 'string' : 'hash']
|
||||
: data.map;
|
||||
}
|
||||
|
||||
export default getMapData;
|
||||
Reference in New Issue
Block a user