@finnair/v-validation
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [4.1.0](https://github.com/finnair/v-validation/compare/v4.0.0...v4.1.0) (2022-11-22) | ||
### Bug Fixes | ||
* V.nullTo cannot support objects as defaultValue ([#86](https://github.com/finnair/v-validation/issues/86)) ([662b431](https://github.com/finnair/v-validation/commit/662b4315b1ae1b59e4e663581d7ff96bf26ab3c1)) | ||
# [4.0.0](https://github.com/finnair/v-validation/compare/v3.2.0...v4.0.0) (2022-11-07) | ||
@@ -8,0 +19,0 @@ |
@@ -42,3 +42,5 @@ import { SchemaValidator, SchemaModel } from './schema'; | ||
toMapType: (keys: Validator, values: Validator) => MapNormalizer; | ||
nullTo: (defaultValue: any) => ValueMapper; | ||
nullTo: (defaultValue: string | number | bigint | boolean | symbol) => ValueMapper; | ||
nullToObject: () => ValueMapper; | ||
nullToArray: () => ValueMapper; | ||
array: (...items: Validator[]) => ArrayValidator; | ||
@@ -45,0 +47,0 @@ toArray: (...items: Validator[]) => ArrayNormalizer; |
@@ -49,2 +49,4 @@ "use strict"; | ||
nullTo: (defaultValue) => new validators_1.ValueMapper(value => ((0, validators_1.isNullOrUndefined)(value) ? defaultValue : value)), | ||
nullToObject: () => new validators_1.ValueMapper(value => ((0, validators_1.isNullOrUndefined)(value) ? {} : value)), | ||
nullToArray: () => new validators_1.ValueMapper(value => ((0, validators_1.isNullOrUndefined)(value) ? [] : value)), | ||
array: (...items) => new validators_1.ArrayValidator((0, validators_1.maybeAllOfValidator)(items)), | ||
@@ -51,0 +53,0 @@ toArray: (...items) => new validators_1.ArrayNormalizer((0, validators_1.maybeAllOfValidator)(items)), |
{ | ||
"name": "@finnair/v-validation", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"private": false, | ||
@@ -33,3 +33,3 @@ "description": "V-validation core package", | ||
}, | ||
"gitHead": "d6540b51c4f1c57563602f66bd3157637703529b" | ||
"gitHead": "7fa7827e86f5c6da14d89bf80a6b58408a84bf4d" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135928
2250