@badrap/valita
Advanced tools
Comparing version 0.0.24 to 0.0.25
@@ -256,8 +256,2 @@ "use strict"; | ||
var Nothing = Symbol(); | ||
var FuncMode; | ||
(function (FuncMode) { | ||
FuncMode[FuncMode["PASS"] = 0] = "PASS"; | ||
FuncMode[FuncMode["STRICT"] = 1] = "STRICT"; | ||
FuncMode[FuncMode["STRIP"] = 2] = "STRIP"; | ||
})(FuncMode || (FuncMode = {})); | ||
var AbstractType = /** @class */ (function () { | ||
@@ -279,8 +273,8 @@ function AbstractType() { | ||
AbstractType.prototype.try = function (v, options) { | ||
var mode = FuncMode.STRICT; | ||
var mode = 1 /* STRICT */; | ||
if (options && options.mode === "passthrough") { | ||
mode = FuncMode.PASS; | ||
mode = 0 /* PASS */; | ||
} | ||
else if (options && options.mode === "strip") { | ||
mode = FuncMode.STRIP; | ||
mode = 2 /* STRIP */; | ||
} | ||
@@ -554,3 +548,3 @@ var r = this.func(v, mode); | ||
} | ||
else if (mode === FuncMode.STRIP) { | ||
else if (mode === 2 /* STRIP */) { | ||
result = | ||
@@ -590,3 +584,3 @@ result === true | ||
} | ||
result = addResult(result, funcs[i], obj, key, value, FuncMode.PASS, assignKnown); | ||
result = addResult(result, funcs[i], obj, key, value, 0 /* PASS */, assignKnown); | ||
} | ||
@@ -645,3 +639,3 @@ return result; | ||
var result; | ||
if (mode !== FuncMode.PASS) { | ||
if (mode !== 0 /* PASS */) { | ||
result = strict(obj, mode); | ||
@@ -648,0 +642,0 @@ } |
@@ -256,8 +256,2 @@ "use strict"; | ||
var Nothing = Symbol(); | ||
var FuncMode; | ||
(function (FuncMode) { | ||
FuncMode[FuncMode["PASS"] = 0] = "PASS"; | ||
FuncMode[FuncMode["STRICT"] = 1] = "STRICT"; | ||
FuncMode[FuncMode["STRIP"] = 2] = "STRIP"; | ||
})(FuncMode || (FuncMode = {})); | ||
var AbstractType = /** @class */ (function () { | ||
@@ -279,8 +273,8 @@ function AbstractType() { | ||
AbstractType.prototype.try = function (v, options) { | ||
var mode = FuncMode.STRICT; | ||
var mode = 1 /* STRICT */; | ||
if (options && options.mode === "passthrough") { | ||
mode = FuncMode.PASS; | ||
mode = 0 /* PASS */; | ||
} | ||
else if (options && options.mode === "strip") { | ||
mode = FuncMode.STRIP; | ||
mode = 2 /* STRIP */; | ||
} | ||
@@ -554,3 +548,3 @@ var r = this.func(v, mode); | ||
} | ||
else if (mode === FuncMode.STRIP) { | ||
else if (mode === 2 /* STRIP */) { | ||
result = | ||
@@ -590,3 +584,3 @@ result === true | ||
} | ||
result = addResult(result, funcs[i], obj, key, value, FuncMode.PASS, assignKnown); | ||
result = addResult(result, funcs[i], obj, key, value, 0 /* PASS */, assignKnown); | ||
} | ||
@@ -645,3 +639,3 @@ return result; | ||
var result; | ||
if (mode !== FuncMode.PASS) { | ||
if (mode !== 0 /* PASS */) { | ||
result = strict(obj, mode); | ||
@@ -648,0 +642,0 @@ } |
{ | ||
"name": "@badrap/valita", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "A validation & parsing library for TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
409550
6993