{"size": 623, "ext": "js", "max_stars_repo_path": "node_modules/react-redux-form/lib/utils/is-validity-invalid.js", "max_stars_repo_name": "zenners/shuffleph", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/react-redux-form/lib/utils/is-validity-invalid.js", "max_issues_repo_name": "zenners/shuffleph", "max_issues_repo_issues_event_min_datetime": "2021-05-11T05:18:03.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-18T21:55:31.000Z", "max_forks_repo_path": "node_modules/react-redux-form/lib/utils/is-validity-invalid.js", "max_forks_repo_name": "zenners/shuffleph", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 23.9615384615, "max_line_length": 95, "alphanum_fraction": 0.7078651685}
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = isValidityInvalid;

var _isPlainObject = require('./is-plain-object');

var _isPlainObject2 = _interopRequireDefault(_isPlainObject);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function isValidityInvalid(errors) {
  if (Array.isArray(errors)) {
    return errors.some(isValidityInvalid);
  }

  if ((0, _isPlainObject2.default)(errors)) {
    return Object.keys(errors).some(function (key) {
      return isValidityInvalid(errors[key]);
    });
  }

  return !!errors;
}