2016-10-10 03:43:44 +02:00
|
|
|
var nativeCreate = require('./_nativeCreate');
|
|
|
|
|
|
|
|
/** Used for built-in method references. */
|
|
|
|
var objectProto = Object.prototype;
|
|
|
|
|
|
|
|
/** Used to check objects for own properties. */
|
|
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks if a hash value for `key` exists.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
* @name has
|
|
|
|
* @memberOf Hash
|
|
|
|
* @param {string} key The key of the entry to check.
|
|
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
|
|
*/
|
|
|
|
function hashHas(key) {
|
|
|
|
var data = this.__data__;
|
2017-04-20 03:09:25 +02:00
|
|
|
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
2016-10-10 03:43:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = hashHas;
|