Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / _basePick.js
1 var arrayReduce = require('./_arrayReduce');
2
3 /**
4  * The base implementation of `_.pick` without support for individual
5  * property names.
6  *
7  * @private
8  * @param {Object} object The source object.
9  * @param {string[]} props The property names to pick.
10  * @returns {Object} Returns the new object.
11  */
12 function basePick(object, props) {
13   object = Object(object);
14   return arrayReduce(props, function(result, key) {
15     if (key in object) {
16       result[key] = object[key];
17     }
18     return result;
19   }, {});
20 }
21
22 module.exports = basePick;