@nhtio/encoder 0.1.0-master-b66a109d → 0.1.0-master-e7b311e8
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-CuUgGvwb.js → exceptions-CHv3uWrN.js} +2 -2
- package/{exceptions-CuUgGvwb.js.map → exceptions-CHv3uWrN.js.map} +1 -1
- package/{exceptions-hG10RUaJ.mjs → exceptions-DX4Wrk6C.mjs} +2 -2
- package/{exceptions-hG10RUaJ.mjs.map → exceptions-DX4Wrk6C.mjs.map} +1 -1
- package/exceptions.cjs +1 -1
- package/exceptions.mjs +1 -1
- package/index.cjs +5 -5
- package/index.cjs.map +1 -1
- package/index.mjs +5 -5
- package/index.mjs.map +1 -1
- package/package.json +6 -6
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as isObject, a as isCustomEncodable, E as ENCODE_METHOD, b as isArray, c as isSet, d as isMap, e as isLuxonSystemZone, f as isLuxonInterval, I as Interval, D as DateTime, g as isLuxonDuration, h as Duration, j as isLuxonDateTime, k as isPhoneObject, l as isTypedArray, m as isBigIntTypedArray, n as isPrimitive, o as isUniterableObject, p as isError, q as isBigInt, r as isUnsafeInteger, s as isNegativeInfinity, t as isPositiveInfinity, u as isNegativeZero, v as DECODE_METHOD, w as Info, P as Phone } from "./type_guards-DMqlMT2e.mjs";
|
|
2
2
|
import { FunctionSerializer } from "./function_serializer.mjs";
|
|
3
|
-
import { E as E_UNENCODABLE_VALUE, a as E_CIRCULAR_REFERENCE, b as E_ENCODING_FAILED, B as BaseException, c as E_UNDECODABLE_VALUE, d as E_NOT_AN_ENCODED_VALUE, e as E_INVALID_VERSION, f as E_INCOMPATIBLE_VERSION } from "./exceptions-
|
|
3
|
+
import { E as E_UNENCODABLE_VALUE, a as E_CIRCULAR_REFERENCE, b as E_ENCODING_FAILED, B as BaseException, c as E_UNDECODABLE_VALUE, d as E_NOT_AN_ENCODED_VALUE, e as E_INVALID_VERSION, f as E_INCOMPATIBLE_VERSION } from "./exceptions-DX4Wrk6C.mjs";
|
|
4
4
|
var re = { exports: {} };
|
|
5
5
|
var constants;
|
|
6
6
|
var hasRequiredConstants;
|
|
@@ -3361,11 +3361,11 @@ const { parse: $parse, stringify: $stringify } = JSON;
|
|
|
3361
3361
|
const options = { json: true, lossy: true };
|
|
3362
3362
|
const parse = (str) => deserialize($parse(str));
|
|
3363
3363
|
const stringify = (any) => $stringify(serialize(any, options));
|
|
3364
|
-
const version = "0.1.0-master-
|
|
3364
|
+
const version = "0.1.0-master-e7b311e8";
|
|
3365
3365
|
const encode = (what) => {
|
|
3366
3366
|
const structured = toStructuredData(what);
|
|
3367
3367
|
const serialized = serialize(structured, { lossy: true, json: true });
|
|
3368
|
-
const json = stringify({ version: "0.1.0-master-
|
|
3368
|
+
const json = stringify({ version: "0.1.0-master-e7b311e8", serialized });
|
|
3369
3369
|
return utoa(json);
|
|
3370
3370
|
};
|
|
3371
3371
|
const decode = (base64) => {
|
|
@@ -3376,11 +3376,11 @@ const decode = (base64) => {
|
|
|
3376
3376
|
throw new E_NOT_AN_ENCODED_VALUE(base64);
|
|
3377
3377
|
}
|
|
3378
3378
|
const { version: payloadVersion, serialized } = parsed;
|
|
3379
|
-
if (semverExports.valid("0.1.0-master-
|
|
3379
|
+
if (semverExports.valid("0.1.0-master-e7b311e8")) {
|
|
3380
3380
|
if (!semverExports.valid(semverExports.coerce(payloadVersion))) {
|
|
3381
3381
|
throw new E_INVALID_VERSION(payloadVersion);
|
|
3382
3382
|
}
|
|
3383
|
-
if (semverExports.gt(semverExports.coerce(payloadVersion), "0.1.0-master-
|
|
3383
|
+
if (semverExports.gt(semverExports.coerce(payloadVersion), "0.1.0-master-e7b311e8")) {
|
|
3384
3384
|
throw new E_INCOMPATIBLE_VERSION(payloadVersion);
|
|
3385
3385
|
}
|
|
3386
3386
|
}
|