toolbox-x 2.0.13 → 2.2.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/dist/{Color-B2SgCGbm.d.mts → Color-CInCJvH7.d.mts} +98 -14
- package/dist/{Color-asKZqwDF.d.cts → Color-CVRcGmWe.d.cts} +98 -14
- package/dist/{Stylog-CRNMQ_uV.d.cts → Stylog-00MmV27Z.d.cts} +1 -1
- package/dist/{Stylog-Cvzo5z86.d.mts → Stylog-Bi1f4CR9.d.mts} +1 -1
- package/dist/{array-D8VGEDBI.d.mts → array-CbAKXvhH.d.mts} +3 -1
- package/dist/{array-ChT6TxQ7.d.cts → array-EVkwcL_k.d.cts} +3 -1
- package/dist/{basics-Dald7J6c.mjs → basics-20lm69yy.mjs} +5 -98
- package/dist/{basics-Bb5ovcvz.cjs → basics-byj0VH1c.cjs} +5 -140
- package/dist/colors.cjs +130 -24
- package/dist/colors.d.cts +2 -2
- package/dist/colors.d.mts +2 -2
- package/dist/colors.mjs +130 -24
- package/dist/constants.cjs +14 -14
- package/dist/constants.mjs +1 -1
- package/dist/{convert-Cqy2Llek.cjs → convert-BjKz_hhr.cjs} +6 -2
- package/dist/{convert-lXdkXPJR.mjs → convert-DRZXcjcS.mjs} +6 -2
- package/dist/date.cjs +6 -6
- package/dist/date.mjs +4 -4
- package/dist/dom.cjs +12 -11
- package/dist/dom.d.cts +2 -2
- package/dist/dom.d.mts +2 -2
- package/dist/dom.mjs +7 -6
- package/dist/{form-CHFqlgPr.d.cts → form-DA-YShnM.d.cts} +3 -2
- package/dist/{form-crhNgN40.d.mts → form-DIYoIS0E.d.mts} +3 -2
- package/dist/{guards-D8Iz6EEy.cjs → guards-BSwFQX1M.cjs} +3 -3
- package/dist/{guards-DziDBD0p.mjs → guards-CNG9gnvL.mjs} +1 -1
- package/dist/guards-CqbVT4L5.cjs +156 -0
- package/dist/{guards-DGN95D2h.cjs → guards-CrfVwk0-.cjs} +1 -1
- package/dist/guards-DKGBsd6x.mjs +115 -0
- package/dist/{guards-D1et4U32.mjs → guards-Dc9MB9on.mjs} +3 -3
- package/dist/guards.cjs +37 -36
- package/dist/guards.d.cts +2 -2
- package/dist/guards.d.mts +2 -2
- package/dist/guards.mjs +5 -4
- package/dist/hash.cjs +8 -8
- package/dist/hash.mjs +8 -8
- package/dist/{index-C9x0f9jU.d.mts → index-BbBnKdBb.d.mts} +1 -1
- package/dist/{index-BgomIbws.d.cts → index-D00Uqm9S.d.cts} +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +4 -5
- package/dist/index.d.mts +4 -5
- package/dist/index.mjs +12 -12
- package/dist/{parse-DUJ0YThn.mjs → parse-TuFyLeVH.mjs} +3 -3
- package/dist/{parse-CbVVRoFY.cjs → parse-jh637S25.cjs} +4 -4
- package/dist/pluralizer.cjs +1 -1
- package/dist/pluralizer.mjs +1 -1
- package/dist/{query-B4Lrr5Vt.mjs → query-BomnyWh3.mjs} +5 -5
- package/dist/{query-BUBCpo-q.cjs → query-sWSi-d7u.cjs} +10 -10
- package/dist/{specials-dkYP1Nh2.cjs → specials-DU8u108m.cjs} +1 -1
- package/dist/{specials-Hq5Ncd6y.mjs → specials-krf7zsqI.mjs} +1 -1
- package/dist/stylog.cjs +3 -3
- package/dist/stylog.d.cts +2 -2
- package/dist/stylog.d.mts +2 -2
- package/dist/stylog.mjs +3 -3
- package/dist/types/array.d.cts +2 -2
- package/dist/types/array.d.mts +2 -2
- package/dist/types/colors.d.cts +1 -1
- package/dist/types/colors.d.mts +1 -1
- package/dist/types/form.d.cts +1 -1
- package/dist/types/form.d.mts +1 -1
- package/dist/types/stylog.d.cts +1 -1
- package/dist/types/stylog.d.mts +1 -1
- package/dist/{utilities-DPscNbS1.mjs → utilities-BSv8VbnM.mjs} +1 -1
- package/dist/{utilities-CWV1GPGY.cjs → utilities-BVpk3LKy.cjs} +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
18
|
+
const require_specials = require('./specials-DU8u108m.cjs');
|
|
19
|
+
const require_utilities = require('./utilities-BVpk3LKy.cjs');
|
|
20
|
+
const require_timezone = require('./timezone-CSz7R0L6.cjs');
|
|
21
|
+
|
|
22
|
+
//#region src/date/guards.ts
|
|
23
|
+
/**
|
|
24
|
+
* * Checks if the provided value is a valid time string in "HH:MM" format.
|
|
25
|
+
*
|
|
26
|
+
* @param value - The value to check.
|
|
27
|
+
* @returns `true` if the value is a valid time string, `false` otherwise.
|
|
28
|
+
*/
|
|
29
|
+
function isValidTime(value) {
|
|
30
|
+
if (!require_primitives.isNonEmptyString(value)) return false;
|
|
31
|
+
const [hourStr, minuteStr] = value.split(":");
|
|
32
|
+
if (!require_specials.isNumericString(hourStr) || !require_specials.isNumericString(minuteStr)) return false;
|
|
33
|
+
const hour = Number(hourStr);
|
|
34
|
+
const minute = Number(minuteStr);
|
|
35
|
+
return hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* * Checks if the provided value is a valid `UTCOffset` (e.g. `UTC-01:30`).
|
|
39
|
+
*
|
|
40
|
+
* @param value - The value to check.
|
|
41
|
+
* @returns `true` if the value is a valid utc offset, `false` otherwise.
|
|
42
|
+
*/
|
|
43
|
+
function isValidUTCOffset(value) {
|
|
44
|
+
return require_primitives.isString(value) ? /^UTC[+-]?(?:0[0-9]|1[0-4]):(?:00|15|30|45)$/.test(value) : false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* * Validates whether the provided value is a recognized IANA time zone identifier (excluding `"Factory"`), based on the {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones IANA TZ Database}.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* - Relies on a large constant map of time zone identifiers, which can increase bundle size in browser environments. Matches against `597` identifiers.
|
|
51
|
+
* - Prefer {@link isNativeTimeZoneId} when you want a lightweight, native-only validation approach. Matches against `418` identifiers.
|
|
52
|
+
*
|
|
53
|
+
* @param value Time zone identifier to validate.
|
|
54
|
+
* @returns `true` if the value is a valid IANA time zone identifier, otherwise `false`.
|
|
55
|
+
*/
|
|
56
|
+
function isValidTimeZoneId(value) {
|
|
57
|
+
return require_primitives.isNonEmptyString(value) ? new Set([...require_timezone.IANA_TZ_IDS]).has(value) : false;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* * Validates whether the provided value is a supported time zone identifier using the native JavaScript API (`Intl.supportedValuesOf('timeZone')`).
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* - Uses only native {@link Intl} capabilities—minimal code footprint, highly performant. Matches against `418` identifiers.
|
|
64
|
+
* - Prefer {@link isValidTimeZoneId} when validation must align strictly with the full
|
|
65
|
+
* {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones IANA TZ Database}. Matches against `597` identifiers.
|
|
66
|
+
*
|
|
67
|
+
* @param value Time zone identifier to validate.
|
|
68
|
+
* @returns `true` if the value is a valid native JS-supported time zone identifier, otherwise `false`.
|
|
69
|
+
*/
|
|
70
|
+
function isNativeTimeZoneId(value) {
|
|
71
|
+
return require_primitives.isNonEmptyString(value) ? new Set(require_timezone.NATIVE_TZ_IDS).has(value) : false;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* * Checks if the year is a leap year.
|
|
75
|
+
*
|
|
76
|
+
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
77
|
+
* - For example, 2000 and 2400 are leap years, but 1900 and 2100 are not.
|
|
78
|
+
* @param year The year to check.
|
|
79
|
+
* @returns `true` if the year is a leap year, `false` otherwise.
|
|
80
|
+
*/
|
|
81
|
+
function isLeapYear(year) {
|
|
82
|
+
const $year = require_utilities.normalizeNumber(year);
|
|
83
|
+
return $year ? $year % 4 === 0 && $year % 100 !== 0 || $year % 400 === 0 : false;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* * Checks if a value is a date-like object from `Date`, `Chronos`, `Moment.js`, `Day.js`, `Luxon`, `JS-Joda`, or `Temporal`
|
|
87
|
+
* @param value Value to check if it is date-like object.
|
|
88
|
+
* @returns `true` if the value is date-like object, otherwise `false`.
|
|
89
|
+
*/
|
|
90
|
+
function isDateLike(value) {
|
|
91
|
+
if (value instanceof Date) return true;
|
|
92
|
+
if (require_specials.isObject(value)) {
|
|
93
|
+
if (require_specials.isFunction(value.format) && require_specials.isFunction(value.toJSON) && require_specials.isFunction(value.toISOString)) return true;
|
|
94
|
+
if (require_specials.isFunction(value.toISO) && require_specials.isFunction(value.toFormat) && require_primitives.isBoolean(value.isValid)) return true;
|
|
95
|
+
if (require_specials.isFunction(value.plus) && require_specials.isFunction(value.minus) && require_specials.isFunction(value.equals) && require_specials.isFunction(value.getClass)) return true;
|
|
96
|
+
if (require_specials.isFunction(value.toJSON) && require_specials.isFunction(value.toString) && [
|
|
97
|
+
"Instant",
|
|
98
|
+
"Duration",
|
|
99
|
+
"PlainDate",
|
|
100
|
+
"PlainTime",
|
|
101
|
+
"PlainDateTime",
|
|
102
|
+
"PlainMonthDay",
|
|
103
|
+
"PlainYearMonth",
|
|
104
|
+
"ZonedDateTime"
|
|
105
|
+
].includes(value.constructor?.name ?? "")) return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
/** Checks if a value represents time value (number) with different forms of {@link TimeWithUnit units} */
|
|
110
|
+
function isTimeWithUnit(value) {
|
|
111
|
+
return require_primitives.isNonEmptyString(value) && /^-?\d*\.?\d+ *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|months?|mo|years?|yrs?|y)?$/i.test(value);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
//#endregion
|
|
115
|
+
Object.defineProperty(exports, 'isDateLike', {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () {
|
|
118
|
+
return isDateLike;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, 'isLeapYear', {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () {
|
|
124
|
+
return isLeapYear;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, 'isNativeTimeZoneId', {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () {
|
|
130
|
+
return isNativeTimeZoneId;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, 'isTimeWithUnit', {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () {
|
|
136
|
+
return isTimeWithUnit;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, 'isValidTime', {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () {
|
|
142
|
+
return isValidTime;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, 'isValidTimeZoneId', {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () {
|
|
148
|
+
return isValidTimeZoneId;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(exports, 'isValidUTCOffset', {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () {
|
|
154
|
+
return isValidUTCOffset;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
@@ -65,7 +65,7 @@ const _isSimilarToLast = (recentColors, newColor) => {
|
|
|
65
65
|
* @returns `true` if it's a valid alpha value, `false` if not.
|
|
66
66
|
*/
|
|
67
67
|
function _isValidAlpha(value) {
|
|
68
|
-
return value >= 0 && value <= 1 && !isNaN(value);
|
|
68
|
+
return value >= 0 && value <= 1 && !Number.isNaN(value);
|
|
69
69
|
}
|
|
70
70
|
/** @private Validates RGB component (0–255). */
|
|
71
71
|
function _isValidRGBComponent(value) {
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 - present Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { a as isNonEmptyString, d as isString, n as isBoolean } from "./primitives-Djsevc69.mjs";
|
|
18
|
+
import { T as isObject, b as isFunction, d as isNumericString } from "./specials-krf7zsqI.mjs";
|
|
19
|
+
import { a as normalizeNumber } from "./utilities-BSv8VbnM.mjs";
|
|
20
|
+
import { n as NATIVE_TZ_IDS, t as IANA_TZ_IDS } from "./timezone-avZ4TvDx.mjs";
|
|
21
|
+
|
|
22
|
+
//#region src/date/guards.ts
|
|
23
|
+
/**
|
|
24
|
+
* * Checks if the provided value is a valid time string in "HH:MM" format.
|
|
25
|
+
*
|
|
26
|
+
* @param value - The value to check.
|
|
27
|
+
* @returns `true` if the value is a valid time string, `false` otherwise.
|
|
28
|
+
*/
|
|
29
|
+
function isValidTime(value) {
|
|
30
|
+
if (!isNonEmptyString(value)) return false;
|
|
31
|
+
const [hourStr, minuteStr] = value.split(":");
|
|
32
|
+
if (!isNumericString(hourStr) || !isNumericString(minuteStr)) return false;
|
|
33
|
+
const hour = Number(hourStr);
|
|
34
|
+
const minute = Number(minuteStr);
|
|
35
|
+
return hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* * Checks if the provided value is a valid `UTCOffset` (e.g. `UTC-01:30`).
|
|
39
|
+
*
|
|
40
|
+
* @param value - The value to check.
|
|
41
|
+
* @returns `true` if the value is a valid utc offset, `false` otherwise.
|
|
42
|
+
*/
|
|
43
|
+
function isValidUTCOffset(value) {
|
|
44
|
+
return isString(value) ? /^UTC[+-]?(?:0[0-9]|1[0-4]):(?:00|15|30|45)$/.test(value) : false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* * Validates whether the provided value is a recognized IANA time zone identifier (excluding `"Factory"`), based on the {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones IANA TZ Database}.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* - Relies on a large constant map of time zone identifiers, which can increase bundle size in browser environments. Matches against `597` identifiers.
|
|
51
|
+
* - Prefer {@link isNativeTimeZoneId} when you want a lightweight, native-only validation approach. Matches against `418` identifiers.
|
|
52
|
+
*
|
|
53
|
+
* @param value Time zone identifier to validate.
|
|
54
|
+
* @returns `true` if the value is a valid IANA time zone identifier, otherwise `false`.
|
|
55
|
+
*/
|
|
56
|
+
function isValidTimeZoneId(value) {
|
|
57
|
+
return isNonEmptyString(value) ? new Set([...IANA_TZ_IDS]).has(value) : false;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* * Validates whether the provided value is a supported time zone identifier using the native JavaScript API (`Intl.supportedValuesOf('timeZone')`).
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* - Uses only native {@link Intl} capabilities—minimal code footprint, highly performant. Matches against `418` identifiers.
|
|
64
|
+
* - Prefer {@link isValidTimeZoneId} when validation must align strictly with the full
|
|
65
|
+
* {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones IANA TZ Database}. Matches against `597` identifiers.
|
|
66
|
+
*
|
|
67
|
+
* @param value Time zone identifier to validate.
|
|
68
|
+
* @returns `true` if the value is a valid native JS-supported time zone identifier, otherwise `false`.
|
|
69
|
+
*/
|
|
70
|
+
function isNativeTimeZoneId(value) {
|
|
71
|
+
return isNonEmptyString(value) ? new Set(NATIVE_TZ_IDS).has(value) : false;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* * Checks if the year is a leap year.
|
|
75
|
+
*
|
|
76
|
+
* - A year is a leap year if it is divisible by 4, but not divisible by 100, unless it is also divisible by 400.
|
|
77
|
+
* - For example, 2000 and 2400 are leap years, but 1900 and 2100 are not.
|
|
78
|
+
* @param year The year to check.
|
|
79
|
+
* @returns `true` if the year is a leap year, `false` otherwise.
|
|
80
|
+
*/
|
|
81
|
+
function isLeapYear(year) {
|
|
82
|
+
const $year = normalizeNumber(year);
|
|
83
|
+
return $year ? $year % 4 === 0 && $year % 100 !== 0 || $year % 400 === 0 : false;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* * Checks if a value is a date-like object from `Date`, `Chronos`, `Moment.js`, `Day.js`, `Luxon`, `JS-Joda`, or `Temporal`
|
|
87
|
+
* @param value Value to check if it is date-like object.
|
|
88
|
+
* @returns `true` if the value is date-like object, otherwise `false`.
|
|
89
|
+
*/
|
|
90
|
+
function isDateLike(value) {
|
|
91
|
+
if (value instanceof Date) return true;
|
|
92
|
+
if (isObject(value)) {
|
|
93
|
+
if (isFunction(value.format) && isFunction(value.toJSON) && isFunction(value.toISOString)) return true;
|
|
94
|
+
if (isFunction(value.toISO) && isFunction(value.toFormat) && isBoolean(value.isValid)) return true;
|
|
95
|
+
if (isFunction(value.plus) && isFunction(value.minus) && isFunction(value.equals) && isFunction(value.getClass)) return true;
|
|
96
|
+
if (isFunction(value.toJSON) && isFunction(value.toString) && [
|
|
97
|
+
"Instant",
|
|
98
|
+
"Duration",
|
|
99
|
+
"PlainDate",
|
|
100
|
+
"PlainTime",
|
|
101
|
+
"PlainDateTime",
|
|
102
|
+
"PlainMonthDay",
|
|
103
|
+
"PlainYearMonth",
|
|
104
|
+
"ZonedDateTime"
|
|
105
|
+
].includes(value.constructor?.name ?? "")) return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
/** Checks if a value represents time value (number) with different forms of {@link TimeWithUnit units} */
|
|
110
|
+
function isTimeWithUnit(value) {
|
|
111
|
+
return isNonEmptyString(value) && /^-?\d*\.?\d+ *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|months?|mo|years?|yrs?|y)?$/i.test(value);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
//#endregion
|
|
115
|
+
export { isValidTime as a, isTimeWithUnit as i, isLeapYear as n, isValidTimeZoneId as o, isNativeTimeZoneId as r, isValidUTCOffset as s, isDateLike as t };
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { d as isString, m as isUndefined } from "./primitives-Djsevc69.mjs";
|
|
18
|
-
import { b as isFunction, w as isNotEmptyObject } from "./specials-
|
|
19
|
-
import { a as normalizeNumber } from "./utilities-
|
|
20
|
-
import { G as stableStringify, n as trimString } from "./basics-
|
|
18
|
+
import { b as isFunction, w as isNotEmptyObject } from "./specials-krf7zsqI.mjs";
|
|
19
|
+
import { a as normalizeNumber } from "./utilities-BSv8VbnM.mjs";
|
|
20
|
+
import { G as stableStringify, n as trimString } from "./basics-20lm69yy.mjs";
|
|
21
21
|
|
|
22
22
|
//#region src/object/basics.ts
|
|
23
23
|
/**
|
package/dist/guards.cjs
CHANGED
|
@@ -16,13 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
18
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
19
|
-
const require_guards = require('./guards-
|
|
20
|
-
const require_specials = require('./specials-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
19
|
+
const require_guards = require('./guards-CrfVwk0-.cjs');
|
|
20
|
+
const require_specials = require('./specials-DU8u108m.cjs');
|
|
21
|
+
const require_guards$1 = require('./guards-CqbVT4L5.cjs');
|
|
22
|
+
const require_basics = require('./basics-byj0VH1c.cjs');
|
|
23
|
+
const require_guards$2 = require('./guards-BSwFQX1M.cjs');
|
|
23
24
|
|
|
24
|
-
exports.areInvalidNumbers = require_guards$
|
|
25
|
-
exports.areNumbersInvalid = require_guards$
|
|
25
|
+
exports.areInvalidNumbers = require_guards$2.areInvalidNumbers;
|
|
26
|
+
exports.areNumbersInvalid = require_guards$2.areInvalidNumbers;
|
|
26
27
|
exports.doesReturnPromise = require_specials.isReturningPromise;
|
|
27
28
|
exports.isArray = require_specials.isArray;
|
|
28
29
|
exports.isArrayOfType = require_specials.isArrayOfType;
|
|
@@ -33,22 +34,22 @@ exports.isBinaryString = require_specials.isBinaryString;
|
|
|
33
34
|
exports.isBoolean = require_primitives.isBoolean;
|
|
34
35
|
exports.isBrowser = require_specials.isBrowser;
|
|
35
36
|
exports.isCSSColor = require_guards.isCSSColor;
|
|
36
|
-
exports.isCamelCase = require_guards$
|
|
37
|
+
exports.isCamelCase = require_guards$2.isCamelCase;
|
|
37
38
|
exports.isDate = require_specials.isDate;
|
|
38
|
-
exports.isDateLike =
|
|
39
|
+
exports.isDateLike = require_guards$1.isDateLike;
|
|
39
40
|
exports.isDateString = require_specials.isDateString;
|
|
40
41
|
exports.isDeepEqual = require_basics.isDeepEqual;
|
|
41
42
|
exports.isEmail = require_specials.isEmail;
|
|
42
43
|
exports.isEmailArray = require_specials.isEmailArray;
|
|
43
|
-
exports.isEmojiOnly = require_guards$
|
|
44
|
+
exports.isEmojiOnly = require_guards$2.isEmojiOnly;
|
|
44
45
|
exports.isEmptyObject = require_specials.isEmptyObject;
|
|
45
46
|
exports.isEnvironment = require_specials.isEnvironment;
|
|
46
47
|
exports.isError = require_specials.isError;
|
|
47
|
-
exports.isEven = require_guards$
|
|
48
|
-
exports.isEvenNumber = require_guards$
|
|
48
|
+
exports.isEven = require_guards$2.isEven;
|
|
49
|
+
exports.isEvenNumber = require_guards$2.isEven;
|
|
49
50
|
exports.isExpectedNodeENV = require_specials.isEnvironment;
|
|
50
51
|
exports.isFalsy = require_primitives.isFalsy;
|
|
51
|
-
exports.isFibonacci = require_guards$
|
|
52
|
+
exports.isFibonacci = require_guards$2.isFibonacci;
|
|
52
53
|
exports.isFunction = require_specials.isFunction;
|
|
53
54
|
exports.isHSL = require_guards.isHSL;
|
|
54
55
|
exports.isHSLA = require_guards.isHSLA;
|
|
@@ -57,17 +58,17 @@ exports.isHex8 = require_guards.isHex8;
|
|
|
57
58
|
exports.isHexString = require_specials.isHexString;
|
|
58
59
|
exports.isIPAddress = require_specials.isIPAddress;
|
|
59
60
|
exports.isInteger = require_primitives.isInteger;
|
|
60
|
-
exports.isInvalidNumber = require_guards$
|
|
61
|
-
exports.isInvalidOrEmptyArray = require_guards$
|
|
61
|
+
exports.isInvalidNumber = require_guards$2.areInvalidNumbers;
|
|
62
|
+
exports.isInvalidOrEmptyArray = require_guards$2.isInvalidOrEmptyArray;
|
|
62
63
|
exports.isJSON = require_specials.isJSON;
|
|
63
|
-
exports.isKebabCase = require_guards$
|
|
64
|
-
exports.isLeapYear =
|
|
64
|
+
exports.isKebabCase = require_guards$2.isKebabCase;
|
|
65
|
+
exports.isLeapYear = require_guards$1.isLeapYear;
|
|
65
66
|
exports.isMap = require_specials.isMap;
|
|
66
67
|
exports.isMethod = require_specials.isMethodDescriptor;
|
|
67
68
|
exports.isMethodDescriptor = require_specials.isMethodDescriptor;
|
|
68
|
-
exports.isMultiple = require_guards$
|
|
69
|
-
exports.isMultipleOf = require_guards$
|
|
70
|
-
exports.isNativeTimeZoneId =
|
|
69
|
+
exports.isMultiple = require_guards$2.isMultiple;
|
|
70
|
+
exports.isMultipleOf = require_guards$2.isMultiple;
|
|
71
|
+
exports.isNativeTimeZoneId = require_guards$1.isNativeTimeZoneId;
|
|
71
72
|
exports.isNode = require_specials.isNode;
|
|
72
73
|
exports.isNodeENV = require_specials.isEnvironment;
|
|
73
74
|
exports.isNodeEnvironment = require_specials.isEnvironment;
|
|
@@ -76,22 +77,22 @@ exports.isNormalPrimitive = require_primitives.isNormalPrimitive;
|
|
|
76
77
|
exports.isNotEmptyObject = require_specials.isNotEmptyObject;
|
|
77
78
|
exports.isNull = require_primitives.isNull;
|
|
78
79
|
exports.isNumber = require_primitives.isNumber;
|
|
79
|
-
exports.isNumberInvalid = require_guards$
|
|
80
|
+
exports.isNumberInvalid = require_guards$2.areInvalidNumbers;
|
|
80
81
|
exports.isNumericString = require_specials.isNumericString;
|
|
81
82
|
exports.isObject = require_specials.isObject;
|
|
82
83
|
exports.isObjectEmpty = require_specials.isEmptyObject;
|
|
83
84
|
exports.isObjectWithKeys = require_specials.isObjectWithKeys;
|
|
84
|
-
exports.isOdd = require_guards$
|
|
85
|
-
exports.isOddNumber = require_guards$
|
|
86
|
-
exports.isPalindrome = require_guards$
|
|
87
|
-
exports.isPartOfFibonacci = require_guards$
|
|
88
|
-
exports.isPartOfFibonacciSeries = require_guards$
|
|
89
|
-
exports.isPascalCase = require_guards$
|
|
90
|
-
exports.isPerfectSquare = require_guards$
|
|
85
|
+
exports.isOdd = require_guards$2.isOdd;
|
|
86
|
+
exports.isOddNumber = require_guards$2.isOdd;
|
|
87
|
+
exports.isPalindrome = require_guards$2.isPalindrome;
|
|
88
|
+
exports.isPartOfFibonacci = require_guards$2.isFibonacci;
|
|
89
|
+
exports.isPartOfFibonacciSeries = require_guards$2.isFibonacci;
|
|
90
|
+
exports.isPascalCase = require_guards$2.isPascalCase;
|
|
91
|
+
exports.isPerfectSquare = require_guards$2.isPerfectSquare;
|
|
91
92
|
exports.isPhoneNumber = require_specials.isPhoneNumber;
|
|
92
93
|
exports.isPositiveInteger = require_primitives.isPositiveInteger;
|
|
93
|
-
exports.isPrime = require_guards$
|
|
94
|
-
exports.isPrimeNumber = require_guards$
|
|
94
|
+
exports.isPrime = require_guards$2.isPrime;
|
|
95
|
+
exports.isPrimeNumber = require_guards$2.isPrime;
|
|
95
96
|
exports.isPrimitive = require_primitives.isPrimitive;
|
|
96
97
|
exports.isPromise = require_specials.isPromise;
|
|
97
98
|
exports.isRGB = require_guards.isRGB;
|
|
@@ -100,10 +101,10 @@ exports.isRegExp = require_specials.isRegExp;
|
|
|
100
101
|
exports.isRegularExpression = require_specials.isRegExp;
|
|
101
102
|
exports.isReturningPromise = require_specials.isReturningPromise;
|
|
102
103
|
exports.isSet = require_specials.isSet;
|
|
103
|
-
exports.isSnakeCase = require_guards$
|
|
104
|
+
exports.isSnakeCase = require_guards$2.isSnakeCase;
|
|
104
105
|
exports.isString = require_primitives.isString;
|
|
105
106
|
exports.isSymbol = require_primitives.isSymbol;
|
|
106
|
-
exports.isTimeWithUnit =
|
|
107
|
+
exports.isTimeWithUnit = require_guards$1.isTimeWithUnit;
|
|
107
108
|
exports.isTruthy = require_primitives.isTruthy;
|
|
108
109
|
exports.isURL = require_specials.isURL;
|
|
109
110
|
exports.isUUID = require_specials.isUUID;
|
|
@@ -120,9 +121,9 @@ exports.isValidArray = require_specials.isValidArray;
|
|
|
120
121
|
exports.isValidEmail = require_specials.isEmail;
|
|
121
122
|
exports.isValidJSON = require_specials.isJSON;
|
|
122
123
|
exports.isValidObject = require_specials.isNotEmptyObject;
|
|
123
|
-
exports.isValidTime =
|
|
124
|
-
exports.isValidTimeString =
|
|
125
|
-
exports.isValidTimeZoneId =
|
|
124
|
+
exports.isValidTime = require_guards$1.isValidTime;
|
|
125
|
+
exports.isValidTimeString = require_guards$1.isValidTime;
|
|
126
|
+
exports.isValidTimeZoneId = require_guards$1.isValidTimeZoneId;
|
|
126
127
|
exports.isValidURL = require_specials.isURL;
|
|
127
|
-
exports.isValidUTC =
|
|
128
|
-
exports.isValidUTCOffset =
|
|
128
|
+
exports.isValidUTC = require_guards$1.isValidUTCOffset;
|
|
129
|
+
exports.isValidUTCOffset = require_guards$1.isValidUTCOffset;
|
package/dist/guards.d.cts
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { $ as GenericFn, B as AsyncFunction, Dn as UTCOffset, Ft as DateLike, Z as FalsyPrimitive, _n as TimeWithUnit, at as NormalPrimitive, ct as Numeric, dt as Primitive, jt as ClockTime, nt as Maybe, pt as ValidArray, rt as MethodDescriptor, wt as $TimeZoneIdentifier, xn as TimeZoneIdNative, y as GenericObject } from "./object-DyVg8BFt.cjs";
|
|
18
|
-
import { b as RGB, g as HSLA, h as HSL, s as CSSColor, v as Hex6, x as RGBA, y as Hex8 } from "./Color-
|
|
19
|
-
import { S as isInvalidOrEmptyArray, f as isDeepEqual, v as isPrime } from "./index-
|
|
18
|
+
import { b as RGB, g as HSLA, h as HSL, s as CSSColor, v as Hex6, x as RGBA, y as Hex8 } from "./Color-CVRcGmWe.cjs";
|
|
19
|
+
import { S as isInvalidOrEmptyArray, f as isDeepEqual, v as isPrime } from "./index-D00Uqm9S.cjs";
|
|
20
20
|
import { C as isURL, S as isPhoneNumber, _ as isEnvironment, a as isUUIDv4, b as isNode, c as isUUIDv7, d as isBase64, f as isBinaryString, g as isEmailArray, h as isEmail, i as isUUIDv3, l as isUUIDv8, m as isDateString, n as isUUIDv1, o as isUUIDv5, p as isBrowser, r as isUUIDv2, s as isUUIDv6, v as isHexString, w as isUUID, x as isNumericString, y as isIPAddress } from "./uuid-CMNRM9NO.cjs";
|
|
21
21
|
|
|
22
22
|
//#region src/colors/guards.d.ts
|
package/dist/guards.d.mts
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { $ as GenericFn, B as AsyncFunction, Dn as UTCOffset, Ft as DateLike, Z as FalsyPrimitive, _n as TimeWithUnit, at as NormalPrimitive, ct as Numeric, dt as Primitive, jt as ClockTime, nt as Maybe, pt as ValidArray, rt as MethodDescriptor, wt as $TimeZoneIdentifier, xn as TimeZoneIdNative, y as GenericObject } from "./object-DyVg8BFt.mjs";
|
|
18
|
-
import { b as RGB, g as HSLA, h as HSL, s as CSSColor, v as Hex6, x as RGBA, y as Hex8 } from "./Color-
|
|
19
|
-
import { S as isInvalidOrEmptyArray, f as isDeepEqual, v as isPrime } from "./index-
|
|
18
|
+
import { b as RGB, g as HSLA, h as HSL, s as CSSColor, v as Hex6, x as RGBA, y as Hex8 } from "./Color-CInCJvH7.mjs";
|
|
19
|
+
import { S as isInvalidOrEmptyArray, f as isDeepEqual, v as isPrime } from "./index-BbBnKdBb.mjs";
|
|
20
20
|
import { C as isURL, S as isPhoneNumber, _ as isEnvironment, a as isUUIDv4, b as isNode, c as isUUIDv7, d as isBase64, f as isBinaryString, g as isEmailArray, h as isEmail, i as isUUIDv3, l as isUUIDv8, m as isDateString, n as isUUIDv1, o as isUUIDv5, p as isBrowser, r as isUUIDv2, s as isUUIDv6, v as isHexString, w as isUUID, x as isNumericString, y as isIPAddress } from "./uuid-DvQsIl9p.mjs";
|
|
21
21
|
|
|
22
22
|
//#region src/colors/guards.d.ts
|
package/dist/guards.mjs
CHANGED
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { a as isNonEmptyString, c as isNumber, d as isString, f as isSymbol, i as isInteger, l as isPositiveInteger, m as isUndefined, n as isBoolean, o as isNormalPrimitive, p as isTruthy, r as isFalsy, s as isNull, t as isBigInt, u as isPrimitive } from "./primitives-Djsevc69.mjs";
|
|
18
|
-
import { a as isHex8, i as isHex6, n as isHSL, o as isRGB, r as isHSLA, s as isRGBA, t as isCSSColor } from "./guards-
|
|
19
|
-
import { A as isSet, C as isMethodDescriptor, D as isPromise, E as isObjectWithKeys, O as isRegExp, S as isMap, T as isObject, _ as isDate, a as isEmail, b as isFunction, c as isHexString, d as isNumericString, f as isPhoneNumber, g as isArrayOfType, h as isArray, i as isDateString, j as isValidArray, k as isReturningPromise, l as isIPAddress, m as isUUID, n as isBinaryString, o as isEmailArray, p as isURL, r as isBrowser, s as isEnvironment, t as isBase64, u as isNode, v as isEmptyObject, w as isNotEmptyObject, x as isJSON, y as isError } from "./specials-
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
18
|
+
import { a as isHex8, i as isHex6, n as isHSL, o as isRGB, r as isHSLA, s as isRGBA, t as isCSSColor } from "./guards-CNG9gnvL.mjs";
|
|
19
|
+
import { A as isSet, C as isMethodDescriptor, D as isPromise, E as isObjectWithKeys, O as isRegExp, S as isMap, T as isObject, _ as isDate, a as isEmail, b as isFunction, c as isHexString, d as isNumericString, f as isPhoneNumber, g as isArrayOfType, h as isArray, i as isDateString, j as isValidArray, k as isReturningPromise, l as isIPAddress, m as isUUID, n as isBinaryString, o as isEmailArray, p as isURL, r as isBrowser, s as isEnvironment, t as isBase64, u as isNode, v as isEmptyObject, w as isNotEmptyObject, x as isJSON, y as isError } from "./specials-krf7zsqI.mjs";
|
|
20
|
+
import { a as isValidTime, i as isTimeWithUnit, n as isLeapYear, o as isValidTimeZoneId, r as isNativeTimeZoneId, s as isValidUTCOffset, t as isDateLike } from "./guards-DKGBsd6x.mjs";
|
|
21
|
+
import { U as isDeepEqual, a as isUUIDv1, c as isUUIDv4, d as isUUIDv7, f as isUUIDv8, l as isUUIDv5, o as isUUIDv2, s as isUUIDv3, u as isUUIDv6 } from "./basics-20lm69yy.mjs";
|
|
22
|
+
import { E as isInvalidOrEmptyArray, S as isPerfectSquare, _ as areInvalidNumbers, a as isPascalCase, b as isMultiple, g as isPrime, i as isPalindrome, n as isEmojiOnly, o as isSnakeCase, r as isKebabCase, t as isCamelCase, v as isEven, x as isOdd, y as isFibonacci } from "./guards-Dc9MB9on.mjs";
|
|
22
23
|
|
|
23
24
|
export { areInvalidNumbers, areInvalidNumbers as areNumbersInvalid, areInvalidNumbers as isInvalidNumber, areInvalidNumbers as isNumberInvalid, isReturningPromise as doesReturnPromise, isReturningPromise, isArray, isArrayOfType, isValidArray as isArrayWithLength, isValidArray, isBase64, isBigInt, isBinaryString, isBoolean, isBrowser, isCSSColor, isCamelCase, isDate, isDateLike, isDateString, isDeepEqual, isEmail, isEmail as isValidEmail, isEmailArray, isEmojiOnly, isEmptyObject, isEmptyObject as isObjectEmpty, isEnvironment, isEnvironment as isExpectedNodeENV, isEnvironment as isNodeENV, isEnvironment as isNodeEnvironment, isError, isEven, isEven as isEvenNumber, isFalsy, isFibonacci, isFibonacci as isPartOfFibonacci, isFibonacci as isPartOfFibonacciSeries, isFunction, isHSL, isHSLA, isHex6, isHex8, isHexString, isIPAddress, isInteger, isInvalidOrEmptyArray, isJSON, isJSON as isValidJSON, isKebabCase, isLeapYear, isMap, isMethodDescriptor as isMethod, isMethodDescriptor, isMultiple, isMultiple as isMultipleOf, isNativeTimeZoneId, isNode, isNonEmptyString, isNormalPrimitive, isNotEmptyObject, isNotEmptyObject as isValidObject, isNull, isNumber, isNumericString, isObject, isObjectWithKeys, isOdd, isOdd as isOddNumber, isPalindrome, isPascalCase, isPerfectSquare, isPhoneNumber, isPositiveInteger, isPrime, isPrime as isPrimeNumber, isPrimitive, isPromise, isRGB, isRGBA, isRegExp, isRegExp as isRegularExpression, isSet, isSnakeCase, isString, isSymbol, isTimeWithUnit, isTruthy, isURL, isURL as isValidURL, isUUID, isUUIDv1, isUUIDv2, isUUIDv3, isUUIDv4, isUUIDv5, isUUIDv6, isUUIDv7, isUUIDv8, isUndefined, isValidTime, isValidTime as isValidTimeString, isValidTimeZoneId, isValidUTCOffset as isValidUTC, isValidUTCOffset };
|
package/dist/hash.cjs
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
18
18
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
19
|
-
const require_specials = require('./specials-
|
|
20
|
-
const require_parse = require('./parse-
|
|
21
|
-
const require_basics = require('./basics-
|
|
19
|
+
const require_specials = require('./specials-DU8u108m.cjs');
|
|
20
|
+
const require_parse = require('./parse-jh637S25.cjs');
|
|
21
|
+
const require_basics = require('./basics-byj0VH1c.cjs');
|
|
22
22
|
|
|
23
23
|
//#region src/hash/Cipher.ts
|
|
24
24
|
/**
|
|
@@ -691,7 +691,7 @@ var Signet = class {
|
|
|
691
691
|
* TextCodec.utf8ToHex('ভাষা'); // 'e0 a6 ad e0 a6 be e0 a6 b7 e0 a6 be'
|
|
692
692
|
* TextCodec.hexToUtf8('e0 a6 ad e0 a6 be'); // 'ভা'
|
|
693
693
|
*/
|
|
694
|
-
var TextCodec = class {
|
|
694
|
+
var TextCodec = class TextCodec {
|
|
695
695
|
constructor() {}
|
|
696
696
|
/**
|
|
697
697
|
* @static Validates whether a string represents a valid hexadecimal byte sequence.
|
|
@@ -846,7 +846,7 @@ var TextCodec = class {
|
|
|
846
846
|
* TextCodec.base64ToHex('SGVsbG8=');
|
|
847
847
|
*/
|
|
848
848
|
static base64ToHex(b64, spaced = true) {
|
|
849
|
-
return
|
|
849
|
+
return TextCodec.utf8ToHex(TextCodec.base64ToUtf8(b64), spaced);
|
|
850
850
|
}
|
|
851
851
|
/**
|
|
852
852
|
* @static Converts Base64 directly into binary byte string.
|
|
@@ -859,7 +859,7 @@ var TextCodec = class {
|
|
|
859
859
|
* TextCodec.base64ToBinary('SGVsbG8=');
|
|
860
860
|
*/
|
|
861
861
|
static base64ToBinary(b64, spaced = true) {
|
|
862
|
-
return
|
|
862
|
+
return TextCodec.utf8ToBinary(TextCodec.base64ToUtf8(b64), spaced);
|
|
863
863
|
}
|
|
864
864
|
/**
|
|
865
865
|
* @static Converts hexadecimal byte string into a Base64 string.
|
|
@@ -871,7 +871,7 @@ var TextCodec = class {
|
|
|
871
871
|
* TextCodec.hexToBase64('48 69');
|
|
872
872
|
*/
|
|
873
873
|
static hexToBase64(hex) {
|
|
874
|
-
return
|
|
874
|
+
return TextCodec.utf8ToBase64(TextCodec.hexToUtf8(hex));
|
|
875
875
|
}
|
|
876
876
|
/**
|
|
877
877
|
* @static Converts binary byte string into a Base64 string.
|
|
@@ -883,7 +883,7 @@ var TextCodec = class {
|
|
|
883
883
|
* TextCodec.binaryToBase64('01001000 01101001');
|
|
884
884
|
*/
|
|
885
885
|
static binaryToBase64(binary) {
|
|
886
|
-
return
|
|
886
|
+
return TextCodec.utf8ToBase64(TextCodec.binaryToUtf8(binary));
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
|
package/dist/hash.mjs
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { a as isNonEmptyString } from "./primitives-Djsevc69.mjs";
|
|
18
|
-
import { c as isHexString, m as isUUID, n as isBinaryString, t as isBase64, w as isNotEmptyObject } from "./specials-
|
|
19
|
-
import { c as _toSeconds, s as _secToDate, t as parseMSec } from "./parse-
|
|
20
|
-
import { A as uint8To32ArrayBE, C as bytesToUtf8, D as intTo4BytesBE, E as hmacSha256, G as stableStringify, K as stripJsonEdgeGarbage, O as randomHex, S as bytesToHex, T as hexToBytes, _ as _constantTimeEquals, a as isUUIDv1, b as base64ToBytes, c as isUUIDv4, d as isUUIDv7, f as isUUIDv8, g as sha256, h as sha1, i as decodeUUID, j as utf8ToBytes, k as sha256Bytes, l as isUUIDv5, m as md5, o as isUUIDv2, p as uuid, s as isUUIDv3, t as generateRandomID, u as isUUIDv6, v as _padStartWith0, w as concatBytes, x as bytesToBase64, y as _splitByCharLength } from "./basics-
|
|
18
|
+
import { c as isHexString, m as isUUID, n as isBinaryString, t as isBase64, w as isNotEmptyObject } from "./specials-krf7zsqI.mjs";
|
|
19
|
+
import { c as _toSeconds, s as _secToDate, t as parseMSec } from "./parse-TuFyLeVH.mjs";
|
|
20
|
+
import { A as uint8To32ArrayBE, C as bytesToUtf8, D as intTo4BytesBE, E as hmacSha256, G as stableStringify, K as stripJsonEdgeGarbage, O as randomHex, S as bytesToHex, T as hexToBytes, _ as _constantTimeEquals, a as isUUIDv1, b as base64ToBytes, c as isUUIDv4, d as isUUIDv7, f as isUUIDv8, g as sha256, h as sha1, i as decodeUUID, j as utf8ToBytes, k as sha256Bytes, l as isUUIDv5, m as md5, o as isUUIDv2, p as uuid, s as isUUIDv3, t as generateRandomID, u as isUUIDv6, v as _padStartWith0, w as concatBytes, x as bytesToBase64, y as _splitByCharLength } from "./basics-20lm69yy.mjs";
|
|
21
21
|
|
|
22
22
|
//#region src/hash/Cipher.ts
|
|
23
23
|
/**
|
|
@@ -690,7 +690,7 @@ var Signet = class {
|
|
|
690
690
|
* TextCodec.utf8ToHex('ভাষা'); // 'e0 a6 ad e0 a6 be e0 a6 b7 e0 a6 be'
|
|
691
691
|
* TextCodec.hexToUtf8('e0 a6 ad e0 a6 be'); // 'ভা'
|
|
692
692
|
*/
|
|
693
|
-
var TextCodec = class {
|
|
693
|
+
var TextCodec = class TextCodec {
|
|
694
694
|
constructor() {}
|
|
695
695
|
/**
|
|
696
696
|
* @static Validates whether a string represents a valid hexadecimal byte sequence.
|
|
@@ -845,7 +845,7 @@ var TextCodec = class {
|
|
|
845
845
|
* TextCodec.base64ToHex('SGVsbG8=');
|
|
846
846
|
*/
|
|
847
847
|
static base64ToHex(b64, spaced = true) {
|
|
848
|
-
return
|
|
848
|
+
return TextCodec.utf8ToHex(TextCodec.base64ToUtf8(b64), spaced);
|
|
849
849
|
}
|
|
850
850
|
/**
|
|
851
851
|
* @static Converts Base64 directly into binary byte string.
|
|
@@ -858,7 +858,7 @@ var TextCodec = class {
|
|
|
858
858
|
* TextCodec.base64ToBinary('SGVsbG8=');
|
|
859
859
|
*/
|
|
860
860
|
static base64ToBinary(b64, spaced = true) {
|
|
861
|
-
return
|
|
861
|
+
return TextCodec.utf8ToBinary(TextCodec.base64ToUtf8(b64), spaced);
|
|
862
862
|
}
|
|
863
863
|
/**
|
|
864
864
|
* @static Converts hexadecimal byte string into a Base64 string.
|
|
@@ -870,7 +870,7 @@ var TextCodec = class {
|
|
|
870
870
|
* TextCodec.hexToBase64('48 69');
|
|
871
871
|
*/
|
|
872
872
|
static hexToBase64(hex) {
|
|
873
|
-
return
|
|
873
|
+
return TextCodec.utf8ToBase64(TextCodec.hexToUtf8(hex));
|
|
874
874
|
}
|
|
875
875
|
/**
|
|
876
876
|
* @static Converts binary byte string into a Base64 string.
|
|
@@ -882,7 +882,7 @@ var TextCodec = class {
|
|
|
882
882
|
* TextCodec.binaryToBase64('01001000 01101001');
|
|
883
883
|
*/
|
|
884
884
|
static binaryToBase64(binary) {
|
|
885
|
-
return
|
|
885
|
+
return TextCodec.utf8ToBase64(TextCodec.binaryToUtf8(binary));
|
|
886
886
|
}
|
|
887
887
|
};
|
|
888
888
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { G as ConditionFns, K as Constructor, U as ClassDetails, Xr as ProtoMethodOptions, br as ArrayOfObjectsToStringOptions, dt as Primitive, mt as VoidFn, nt as Maybe, q as DelayedFn, xr as ArrayOfPrimitivesToStringOptions, y as GenericObject } from "./object-DyVg8BFt.mjs";
|
|
18
|
-
import { a as Flattened } from "./array-
|
|
18
|
+
import { a as Flattened } from "./array-CbAKXvhH.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/array/basics.d.ts
|
|
21
21
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { G as ConditionFns, K as Constructor, U as ClassDetails, Xr as ProtoMethodOptions, br as ArrayOfObjectsToStringOptions, dt as Primitive, mt as VoidFn, nt as Maybe, q as DelayedFn, xr as ArrayOfPrimitivesToStringOptions, y as GenericObject } from "./object-DyVg8BFt.cjs";
|
|
18
|
-
import { a as Flattened } from "./array-
|
|
18
|
+
import { a as Flattened } from "./array-EVkwcL_k.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/array/basics.d.ts
|
|
21
21
|
/**
|