New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

form-backend-validation

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-backend-validation - npm Package Compare versions

Comparing version 2.0.2-rc.1 to 2.0.2-rc.2

13

dist/Form.js

@@ -13,2 +13,6 @@ 'use strict';

var _lodash = require('lodash.merge');
var _lodash2 = _interopRequireDefault(_lodash);
var _util = require('./util');

@@ -119,5 +123,3 @@

value: function reset() {
for (var field in this.initial) {
this[field] = this.initial[field];
}
(0, _lodash2.default)(this, this.initial);

@@ -129,4 +131,5 @@ this.errors.clear();

value: function setInitialValues(values) {
// Create a deep copy of the object to avoid mutating nested objects.
this.initial = JSON.parse(JSON.stringify(values));
this.initial = {};
(0, _lodash2.default)(this.initial, values);
}

@@ -133,0 +136,0 @@

{
"name": "form-backend-validation",
"version": "2.0.2-rc.1",
"version": "2.0.2-rc.2",
"description": "An easy way to validate forms using back end logic",

@@ -52,3 +52,7 @@ "main": "dist/index.js",

"testRegex": "test.js$"
},
"dependencies": {
"deepmerge": "^2.0.0",
"lodash.merge": "^4.6.0"
}
}
import Errors from './Errors';
import merge from 'lodash.merge';
import { guardAgainstReservedFieldName, isArray } from './util';

@@ -90,5 +91,3 @@

reset() {
for (const field in this.initial) {
this[field] = this.initial[field];
}
merge(this, this.initial);

@@ -99,4 +98,5 @@ this.errors.clear();

setInitialValues(values) {
// Create a deep copy of the object to avoid mutating nested objects.
this.initial = JSON.parse(JSON.stringify(values));
this.initial = {};
merge(this.initial, values);
}

@@ -103,0 +103,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