function objectValues(obj) {
    var allowArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
    var vals = allowArray && is("array", obj) ? [] : {};

    for (var key in obj) {
      if (hasOwn$1.call(obj, key)) {
        var val = obj[key];
        vals[key] = val === Object(val) ? objectValues(val, allowArray) : val;
      }
    }

    return vals;
  }
Recursively clone an object into a plain array or object, taking only the
own enumerable properties.

@param {any} obj
@param {bool} [allowArray=true]
@return {Object|Array}