Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _baseHas.js
1 /** Used for built-in method references. */
2 var objectProto = Object.prototype;
3
4 /** Used to check objects for own properties. */
5 var hasOwnProperty = objectProto.hasOwnProperty;
6
7 /** Built-in value references. */
8 var getPrototypeOf = Object.getPrototypeOf;
9
10 /**
11  * The base implementation of `_.has` without support for deep paths.
12  *
13  * @private
14  * @param {Object} object The object to query.
15  * @param {Array|string} key The key to check.
16  * @returns {boolean} Returns `true` if `key` exists, else `false`.
17  */
18 function baseHas(object, key) {
19   // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
20   // that are composed entirely of index properties, return `false` for
21   // `hasOwnProperty` checks of them.
22   return hasOwnProperty.call(object, key) ||
23     (typeof object == 'object' && key in object && getPrototypeOf(object) === null);
24 }
25
26 module.exports = baseHas;