source: trip-planner-front/node_modules/lodash/_hashGet.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 772 bytes
Line 
1var nativeCreate = require('./_nativeCreate');
2
3/** Used to stand-in for `undefined` hash values. */
4var HASH_UNDEFINED = '__lodash_hash_undefined__';
5
6/** Used for built-in method references. */
7var objectProto = Object.prototype;
8
9/** Used to check objects for own properties. */
10var 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 */
21function 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
30module.exports = hashGet;
Note: See TracBrowser for help on using the repository browser.