function recursiveObjectEnumerate(obj, cb, seen) {
      if (seen.has(seen)) {
        return;
      }

      seen.add(obj);

      if (obj && typeof obj === 'object' && !Array.isArray(obj)) {
        if (obj instanceof Map) {
          for (const [key, val] of obj) {
            if (typeof val === 'object') {
              recursiveObjectEnumerate(val, cb, seen);
            } else {
              cb(val, key);
            }
          }
        } else {
          Object.keys(obj).forEach(key => {
            if (typeof obj[key] === 'object') {
              recursiveObjectEnumerate(obj[key], cb, seen);
            } else {
              cb(obj[key], key);
            }
          });
        }
      } else if (Array.isArray(obj)) {
        obj.forEach(item => {
          if (typeof item === 'object' || Array.isArray(item)) {
            recursiveObjectEnumerate(item, cb, seen);
          }
        });
      }
    }
Execute `cb(obj, key)` on every object property (non-objects only), recursively.
@param {any} obj
@param {(obj: Record<string, unknown>, key: string) => void} cb
@param {Set<object>} seen