Files
lodash/_getMapData.js
John-David Dalton 07c844053e Bump to v4.12.0.
2016-05-08 12:23:20 -07:00

19 lines
395 B
JavaScript

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;