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 / forIn.js
1 var baseFor = require('./_baseFor'),
2     keysIn = require('./keysIn'),
3     toFunction = require('./_toFunction');
4
5 /**
6  * Iterates over own and inherited enumerable properties of an object invoking
7  * `iteratee` for each property. The iteratee is invoked with three arguments:
8  * (value, key, object). Iteratee functions may exit iteration early by explicitly
9  * returning `false`.
10  *
11  * @static
12  * @memberOf _
13  * @category Object
14  * @param {Object} object The object to iterate over.
15  * @param {Function} [iteratee=_.identity] The function invoked per iteration.
16  * @returns {Object} Returns `object`.
17  * @example
18  *
19  * function Foo() {
20  *   this.a = 1;
21  *   this.b = 2;
22  * }
23  *
24  * Foo.prototype.c = 3;
25  *
26  * _.forIn(new Foo, function(value, key) {
27  *   console.log(key);
28  * });
29  * // => logs 'a', 'b', then 'c' (iteration order is not guaranteed)
30  */
31 function forIn(object, iteratee) {
32   return object == null ? object : baseFor(object, toFunction(iteratee), keysIn);
33 }
34
35 module.exports = forIn;