@nhtio/encoder 1.20260611.0 → 1.20260624.0
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-ryQGeNU_.js → exceptions-BaTe4kyn.js} +2 -2
- package/{exceptions-ryQGeNU_.js.map → exceptions-BaTe4kyn.js.map} +1 -1
- package/{exceptions-WJOP87c3.mjs → exceptions-CypFn5FZ.mjs} +2 -2
- package/{exceptions-WJOP87c3.mjs.map → exceptions-CypFn5FZ.mjs.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 +64 -7
- package/index.cjs.map +1 -1
- package/index.d.ts +32 -1
- package/index.mjs +64 -7
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/{type_guards-UkDoe__i.mjs → type_guards-BAhiOypL.mjs} +37 -25
- package/{type_guards-UkDoe__i.mjs.map → type_guards-BAhiOypL.mjs.map} +1 -1
- package/{type_guards-BWmHnIpZ.js → type_guards-D1YzZ13G.js} +13 -1
- package/{type_guards-BWmHnIpZ.js.map → type_guards-D1YzZ13G.js.map} +1 -1
- package/type_guards.cjs +2 -1
- package/type_guards.cjs.map +1 -1
- package/type_guards.d.ts +39 -0
- package/type_guards.mjs +20 -19
- package/types.d.ts +15 -1
package/package.json
CHANGED
|
@@ -6482,6 +6482,8 @@ function friendlyDateTime$1(dateTimeish) {
|
|
|
6482
6482
|
);
|
|
6483
6483
|
}
|
|
6484
6484
|
}
|
|
6485
|
+
const ENCODE_METHOD = Symbol.for("@nhtio/encoder:toEncoded");
|
|
6486
|
+
const DECODE_METHOD = Symbol.for("@nhtio/encoder:fromEncoded");
|
|
6485
6487
|
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __esmMin = (fn$1, res) => () => (fn$1 && (res = fn$1(fn$1 = 0)), res), __commonJSMin$1 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports), __export = (target, all$1) => {
|
|
6486
6488
|
for (var name$2 in all$1) __defProp(target, name$2, { get: all$1[name$2], enumerable: true });
|
|
6487
6489
|
}, __copyProps = (to, from$2, except, desc$1) => {
|
|
@@ -124106,33 +124108,43 @@ const isLuxonSystemZone = (value) => {
|
|
|
124106
124108
|
const isBigInt = (value) => {
|
|
124107
124109
|
return matchesSchema(value, bigintSchema);
|
|
124108
124110
|
};
|
|
124111
|
+
const isCustomEncodable = (value) => {
|
|
124112
|
+
if (typeof value !== "object" || value === null) return false;
|
|
124113
|
+
if (!(ENCODE_METHOD in value) || typeof value[ENCODE_METHOD] !== "function") return false;
|
|
124114
|
+
const ctor = value.constructor;
|
|
124115
|
+
if (typeof ctor !== "function" || typeof ctor.name !== "string" || ctor.name === "") return false;
|
|
124116
|
+
return DECODE_METHOD in ctor && typeof ctor[DECODE_METHOD] === "function";
|
|
124117
|
+
};
|
|
124109
124118
|
export {
|
|
124110
|
-
|
|
124119
|
+
DECODE_METHOD as D,
|
|
124120
|
+
ENCODE_METHOD as E,
|
|
124111
124121
|
Info$1 as I,
|
|
124112
124122
|
Phone as P,
|
|
124113
|
-
|
|
124114
|
-
|
|
124115
|
-
|
|
124116
|
-
|
|
124117
|
-
|
|
124118
|
-
|
|
124119
|
-
|
|
124120
|
-
|
|
124123
|
+
isCustomEncodable as a,
|
|
124124
|
+
isArray as b,
|
|
124125
|
+
isSet as c,
|
|
124126
|
+
isMap as d,
|
|
124127
|
+
isLuxonSystemZone as e,
|
|
124128
|
+
isLuxonInterval as f,
|
|
124129
|
+
isLuxonDuration as g,
|
|
124130
|
+
isLuxonDateTime as h,
|
|
124121
124131
|
isObject$1 as i,
|
|
124122
|
-
|
|
124123
|
-
|
|
124124
|
-
|
|
124125
|
-
|
|
124126
|
-
|
|
124127
|
-
|
|
124128
|
-
|
|
124129
|
-
|
|
124130
|
-
|
|
124131
|
-
|
|
124132
|
-
|
|
124133
|
-
|
|
124134
|
-
|
|
124135
|
-
|
|
124136
|
-
|
|
124132
|
+
isPhoneObject as j,
|
|
124133
|
+
isTypedArray as k,
|
|
124134
|
+
isBigIntTypedArray as l,
|
|
124135
|
+
isPrimitive as m,
|
|
124136
|
+
isUniterableObject as n,
|
|
124137
|
+
isError as o,
|
|
124138
|
+
isBigInt as p,
|
|
124139
|
+
isUnsafeInteger as q,
|
|
124140
|
+
isNegativeInfinity as r,
|
|
124141
|
+
isPositiveInfinity as s,
|
|
124142
|
+
isNegativeZero as t,
|
|
124143
|
+
Interval$1 as u,
|
|
124144
|
+
DateTime$1 as v,
|
|
124145
|
+
Duration$1 as w,
|
|
124146
|
+
isLucidBinaryValue as x,
|
|
124147
|
+
isInstanceOf as y,
|
|
124148
|
+
isNumber as z
|
|
124137
124149
|
};
|
|
124138
|
-
//# sourceMappingURL=type_guards-
|
|
124150
|
+
//# sourceMappingURL=type_guards-BAhiOypL.mjs.map
|