Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
626 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var nativeCreate = require('./_nativeCreate');
|
---|
| 2 |
|
---|
| 3 | /** Used for built-in method references. */
|
---|
| 4 | var objectProto = Object.prototype;
|
---|
| 5 |
|
---|
| 6 | /** Used to check objects for own properties. */
|
---|
| 7 | var hasOwnProperty = objectProto.hasOwnProperty;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | * Checks if a hash value for `key` exists.
|
---|
| 11 | *
|
---|
| 12 | * @private
|
---|
| 13 | * @name has
|
---|
| 14 | * @memberOf Hash
|
---|
| 15 | * @param {string} key The key of the entry to check.
|
---|
| 16 | * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
---|
| 17 | */
|
---|
| 18 | function hashHas(key) {
|
---|
| 19 | var data = this.__data__;
|
---|
| 20 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | module.exports = hashHas;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.