main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
770 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import nativeCreate from './_nativeCreate.js';
|
---|
| 2 |
|
---|
| 3 | /** Used to stand-in for `undefined` hash values. */
|
---|
| 4 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
---|
| 5 |
|
---|
| 6 | /** Used for built-in method references. */
|
---|
| 7 | var objectProto = Object.prototype;
|
---|
| 8 |
|
---|
| 9 | /** Used to check objects for own properties. */
|
---|
| 10 | var hasOwnProperty = objectProto.hasOwnProperty;
|
---|
| 11 |
|
---|
| 12 | /**
|
---|
| 13 | * Gets the hash value for `key`.
|
---|
| 14 | *
|
---|
| 15 | * @private
|
---|
| 16 | * @name get
|
---|
| 17 | * @memberOf Hash
|
---|
| 18 | * @param {string} key The key of the value to get.
|
---|
| 19 | * @returns {*} Returns the entry value.
|
---|
| 20 | */
|
---|
| 21 | function hashGet(key) {
|
---|
| 22 | var data = this.__data__;
|
---|
| 23 | if (nativeCreate) {
|
---|
| 24 | var result = data[key];
|
---|
| 25 | return result === HASH_UNDEFINED ? undefined : result;
|
---|
| 26 | }
|
---|
| 27 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | export default hashGet;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.