Socket
Socket
Sign inDemoInstall

formact

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formact - npm Package Compare versions

Comparing version 0.10.5 to 0.10.6

6

lib/Form.js

@@ -105,5 +105,7 @@ 'use strict';

}, _this.isValid = function () {
return !(0, _lodash.keys)(_this.errors).find(function (field) {
return _this.errors[field];
var errorKeys = (0, _lodash.keys)(_this.errors);
var errors = (0, _lodash.find)(errorKeys, function (field) {
_this.errors[field];
});
return !errors;
}, _this.onSubmit = function (e) {

@@ -110,0 +112,0 @@ var valid = _this.isValid();

{
"name": "formact",
"version": "0.10.5",
"version": "0.10.6",
"description": "A React Set of Form Components with Context",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -5,3 +5,3 @@ // @flow

import PropTypes from 'prop-types'
import { keys } from 'lodash'
import { keys, find } from 'lodash'

@@ -119,3 +119,7 @@ import type {

isValid = () => {
return !keys(this.errors).find(field => this.errors[field])
const errorKeys = keys(this.errors)
const errors = find(errorKeys, field => {
this.errors[field]
})
return !errors
}

@@ -122,0 +126,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc