@awsless/validate 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -3
- package/dist/index.js +1 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -112,9 +112,7 @@ function duration(arg1, arg2) {
|
|
|
112
112
|
const error = msg ?? "Invalid duration";
|
|
113
113
|
return (0, import_valibot5.transform)(
|
|
114
114
|
(0, import_valibot5.string)(error, [(0, import_valibot5.regex)(/^[0-9]+ (milliseconds?|seconds?|minutes?|hours?|days?)/, error)]),
|
|
115
|
-
(value
|
|
116
|
-
if (issues)
|
|
117
|
-
return;
|
|
115
|
+
(value) => {
|
|
118
116
|
return (0, import_duration.parse)(value);
|
|
119
117
|
},
|
|
120
118
|
pipe
|
package/dist/index.js
CHANGED
|
@@ -85,9 +85,7 @@ function duration(arg1, arg2) {
|
|
|
85
85
|
const error = msg ?? "Invalid duration";
|
|
86
86
|
return transform5(
|
|
87
87
|
string5(error, [regex(/^[0-9]+ (milliseconds?|seconds?|minutes?|hours?|days?)/, error)]),
|
|
88
|
-
(value
|
|
89
|
-
if (issues)
|
|
90
|
-
return;
|
|
88
|
+
(value) => {
|
|
91
89
|
return parse(value);
|
|
92
90
|
},
|
|
93
91
|
pipe
|