@nhtio/encoder 0.1.0-master-3b237666 → 0.1.0-master-f44af99f
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/{exceptions-CkrSQ6oY.mjs → exceptions-C8bYu-xi.mjs} +2 -2
- package/{exceptions-CkrSQ6oY.mjs.map → exceptions-C8bYu-xi.mjs.map} +1 -1
- package/{exceptions-DYhBvDYC.js → exceptions-DiuSuXH-.js} +2 -2
- package/{exceptions-DYhBvDYC.js.map → exceptions-DiuSuXH-.js.map} +1 -1
- package/exceptions.cjs +1 -1
- package/exceptions.mjs +1 -1
- package/function_serializer.cjs +1 -1
- package/function_serializer.mjs +1 -1
- package/index.cjs +52 -25
- package/index.cjs.map +1 -1
- package/index.mjs +52 -25
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/{type_guards-Nh3b7rEF.js → type_guards-BWmHnIpZ.js} +23 -5
- package/{type_guards-Nh3b7rEF.js.map → type_guards-BWmHnIpZ.js.map} +1 -1
- package/{type_guards-BbzVmysZ.mjs → type_guards-UkDoe__i.mjs} +29 -11
- package/{type_guards-BbzVmysZ.mjs.map → type_guards-UkDoe__i.mjs.map} +1 -1
- package/type_guards.cjs +1 -1
- package/type_guards.mjs +5 -5
|
@@ -123857,7 +123857,13 @@ const stringSchema = validator.string().allow("").required();
|
|
|
123857
123857
|
const numberSchema = validator.alternatives(
|
|
123858
123858
|
validator.number(),
|
|
123859
123859
|
validator.object().instance(Number),
|
|
123860
|
-
validator.function().instance(Number)
|
|
123860
|
+
validator.function().instance(Number),
|
|
123861
|
+
validator.valid(
|
|
123862
|
+
Number.MAX_SAFE_INTEGER,
|
|
123863
|
+
Number.MIN_SAFE_INTEGER,
|
|
123864
|
+
Number.MAX_VALUE,
|
|
123865
|
+
Number.MIN_VALUE
|
|
123866
|
+
)
|
|
123861
123867
|
).required();
|
|
123862
123868
|
const booleanSchema = validator.boolean().required();
|
|
123863
123869
|
const bigintSchema = validator.any().custom((value, helpers) => {
|
|
@@ -123995,7 +124001,7 @@ const phoneObjectSchema = validator.alternatives(
|
|
|
123995
124001
|
return value;
|
|
123996
124002
|
}
|
|
123997
124003
|
return helpers.error("any.invalid");
|
|
123998
|
-
}),
|
|
124004
|
+
}).required(),
|
|
123999
124005
|
validator.object({
|
|
124000
124006
|
country: validator.string().required().valid(...[...Array.from(isos), "XX"]),
|
|
124001
124007
|
international: validator.string().allow("").required(),
|
|
@@ -124006,8 +124012,8 @@ const phoneObjectSchema = validator.alternatives(
|
|
|
124006
124012
|
timezone: validator.string().required(),
|
|
124007
124013
|
type: validator.string().valid(...Array.from(PhoneTypes)).required(),
|
|
124008
124014
|
valid: validator.boolean().required()
|
|
124009
|
-
}).unknown(true)
|
|
124010
|
-
);
|
|
124015
|
+
}).unknown(true).required()
|
|
124016
|
+
).required();
|
|
124011
124017
|
const isObject$1 = (value) => {
|
|
124012
124018
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
124013
124019
|
};
|
|
@@ -124061,6 +124067,15 @@ const isNegativeZero = (value) => {
|
|
|
124061
124067
|
if (!isNumber(value)) return false;
|
|
124062
124068
|
return 1 / value < 0 && Math.abs(value) === 0;
|
|
124063
124069
|
};
|
|
124070
|
+
const isPositiveInfinity = (value) => {
|
|
124071
|
+
return typeof value === "number" && !Number.isNaN(value) && !Number.isFinite(value) && value > 0;
|
|
124072
|
+
};
|
|
124073
|
+
const isNegativeInfinity = (value) => {
|
|
124074
|
+
return typeof value === "number" && !Number.isNaN(value) && !Number.isFinite(value) && value < 0;
|
|
124075
|
+
};
|
|
124076
|
+
const isUnsafeInteger = (value) => {
|
|
124077
|
+
return Number.isInteger(value) && !Number.isSafeInteger(value);
|
|
124078
|
+
};
|
|
124064
124079
|
const matchesSchema = (value, schema) => {
|
|
124065
124080
|
const { error } = schema.validate(value, {
|
|
124066
124081
|
abortEarly: true
|
|
@@ -124110,11 +124125,14 @@ export {
|
|
|
124110
124125
|
isUniterableObject as m,
|
|
124111
124126
|
isError as n,
|
|
124112
124127
|
isBigInt as o,
|
|
124113
|
-
|
|
124114
|
-
|
|
124115
|
-
|
|
124116
|
-
|
|
124117
|
-
|
|
124118
|
-
|
|
124128
|
+
isUnsafeInteger as p,
|
|
124129
|
+
isNegativeInfinity as q,
|
|
124130
|
+
isPositiveInfinity as r,
|
|
124131
|
+
isNegativeZero as s,
|
|
124132
|
+
Interval$1 as t,
|
|
124133
|
+
Duration$1 as u,
|
|
124134
|
+
isLucidBinaryValue as v,
|
|
124135
|
+
isInstanceOf as w,
|
|
124136
|
+
isNumber as x
|
|
124119
124137
|
};
|
|
124120
|
-
//# sourceMappingURL=type_guards-
|
|
124138
|
+
//# sourceMappingURL=type_guards-UkDoe__i.mjs.map
|