factorial-form
Advanced tools
Comparing version 2.1.0 to 2.1.1
# Changelog | ||
## `2.1.1` | ||
- Performance improvement: Calculate data only once. | ||
## `2.1.0` | ||
@@ -4,0 +8,0 @@ |
@@ -22,3 +22,2 @@ declare type Type = 'date' | 'timestamp' | 'number' | 'string' | 'file' | 'boolean' | 'cents' | 'any'; | ||
clean(): void; | ||
reset(): void; | ||
setErrors(errors: Array<string> | null): void; | ||
@@ -60,12 +59,7 @@ } | ||
/** | ||
* Cleans all the forms by changing their original | ||
* values to correspond to their current values | ||
* Cleans all the forms by reseting their original | ||
* values | ||
*/ | ||
cleanAll(): void; | ||
/** | ||
* Reset all the forms to their original | ||
* values thereby discarding all changes made | ||
*/ | ||
resetAll(): void; | ||
/** | ||
* Resets all the error fields | ||
@@ -72,0 +66,0 @@ */ |
@@ -199,5 +199,2 @@ 'use strict'; | ||
}; | ||
Field.prototype.reset = function () { | ||
this.value = this.originalValue; | ||
}; | ||
Field.prototype.setErrors = function (errors) { | ||
@@ -244,4 +241,4 @@ this.errors = errors; | ||
/** | ||
* Cleans all the forms by changing their original | ||
* values to correspond to their current values | ||
* Cleans all the forms by reseting their original | ||
* values | ||
*/ | ||
@@ -254,11 +251,2 @@ Form.prototype.cleanAll = function () { | ||
/** | ||
* Reset all the forms to their original | ||
* values thereby discarding all changes made | ||
*/ | ||
Form.prototype.resetAll = function () { | ||
forEach__default['default'](this.fields, function (field) { | ||
return field.reset(); | ||
}); | ||
}; | ||
/** | ||
* Resets all the error fields | ||
@@ -265,0 +253,0 @@ */ |
{ | ||
"name": "factorial-form", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Factorial form library", | ||
@@ -5,0 +5,0 @@ "repository": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
39733
13
972