• File: _getMapData.js
  • Full Path: /var/www/nodejs/callDir/node_modules/lodash/_getMapData.js
  • Date Modified: 06/03/2024 5:11 PM
  • File size: 400 bytes
  • MIME-type: text/plain
  • Charset: utf-8
var isKeyable = require('./_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;
}

module.exports = getMapData;