toolbox-x 2.4.2 → 2.4.6

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{basics-CiT7tnu_.cjs → basics-BGu9ygZK.cjs} +6 -6
  3. package/dist/{basics-9MqP9Ecm.mjs → basics-Bd2mj0uG.mjs} +6 -6
  4. package/dist/{basics-BuHQJCNG.d.mts → basics-D64kohDf.d.mts} +13 -4
  5. package/dist/{basics-CLwtIxap.d.cts → basics-lvlgIf5Y.d.cts} +13 -4
  6. package/dist/{case-BmB2aGyp.d.cts → case-Be3-bSPx.d.cts} +1 -1
  7. package/dist/{case-Ce8HJI8I.d.mts → case-q0o80oIc.d.mts} +1 -1
  8. package/dist/change-case.d.cts +1 -1
  9. package/dist/change-case.d.mts +1 -1
  10. package/dist/{constants-ByLTHWQm.mjs → constants-B6yqsqJ5.mjs} +2 -2
  11. package/dist/{constants-DIBRCBIP.cjs → constants-BUJG8exj.cjs} +2 -2
  12. package/dist/constants.cjs +1 -1
  13. package/dist/constants.mjs +1 -1
  14. package/dist/converter/index.cjs +1 -1
  15. package/dist/converter/index.mjs +1 -1
  16. package/dist/date/index.cjs +4 -5
  17. package/dist/date/index.mjs +4 -5
  18. package/dist/dom/index.cjs +3 -3
  19. package/dist/dom/index.d.cts +2 -2
  20. package/dist/dom/index.d.mts +2 -2
  21. package/dist/dom/index.mjs +3 -3
  22. package/dist/{form-D_5I437n.d.mts → form-CDTwFDkB.d.mts} +1 -1
  23. package/dist/{form-DhsFvo_D.d.cts → form-cW0-Ichd.d.cts} +1 -1
  24. package/dist/guards/index.cjs +3 -3
  25. package/dist/guards/index.mjs +3 -3
  26. package/dist/{guards-DBunDnng.mjs → guards-CyOZsZ1r.mjs} +1 -1
  27. package/dist/{guards-BD2Fkugj.cjs → guards-DalSfIxV.cjs} +1 -1
  28. package/dist/hash/index.cjs +2 -2
  29. package/dist/hash/index.d.cts +1 -1
  30. package/dist/hash/index.d.mts +1 -1
  31. package/dist/hash/index.mjs +2 -2
  32. package/dist/index.cjs +5 -5
  33. package/dist/index.d.cts +4 -4
  34. package/dist/index.d.mts +4 -4
  35. package/dist/index.mjs +5 -5
  36. package/dist/paginator.cjs +1 -1
  37. package/dist/paginator.mjs +1 -1
  38. package/dist/{parse-CILDG7TG.mjs → parse-CsTFudDu.mjs} +3 -3
  39. package/dist/{parse-CffWYCuy.cjs → parse-Dz186-PH.cjs} +3 -3
  40. package/dist/{query-lGVoAJl3.cjs → query-Bo-_PC3j.cjs} +2 -2
  41. package/dist/{query-Cp1dq-qU.mjs → query-CLkSagHs.mjs} +2 -2
  42. package/dist/{query-BMtRmMSC.d.cts → query-Cih_n7VU.d.cts} +1 -1
  43. package/dist/{query-C-r5ZbO-.d.mts → query-DNJK9kPd.d.mts} +1 -1
  44. package/dist/{string-Ok_IMpHP.d.cts → string-Cm9AMOl_.d.cts} +12 -1
  45. package/dist/{string-edtZyJHf.d.mts → string-D7N_U6y2.d.mts} +12 -1
  46. package/dist/types/form.d.cts +1 -1
  47. package/dist/types/form.d.mts +1 -1
  48. package/dist/types/string.d.cts +2 -2
  49. package/dist/types/string.d.mts +2 -2
  50. package/dist/{utils-C4yOIzOJ.cjs → utils-BzeK3wO9.cjs} +25 -17
  51. package/dist/{utils-C0NzTJMR.mjs → utils-DnyVgO8p.mjs} +25 -17
  52. package/package.json +8 -5
package/CHANGELOG.md CHANGED
@@ -4,6 +4,25 @@ All notable changes to **toolbox-x** will be documented in this file.
4
4
 
5
5
  > Auto-generated from git history using [changelog-maker](https://github.com/nodejs/changelog-maker).
6
6
 
7
+ ## [v2.4.6](https://github.com/nazmul-nhb/toolbox-x/releases/tag/v2.4.6) — 2026-06-28
8
+
9
+ [Compare changes](https://github.com/nazmul-nhb/toolbox-x/compare/v2.4.4...v2.4.6)
10
+
11
+ * \[[`56043d65ef`](https://github.com/nazmul-nhb/toolbox-x/commit/56043d65ef)] - 🔧 update(string): added new signature for `truncateString` with `TruncateOptions` (Nazmul Hassan)
12
+ * \[[`bde1e98b99`](https://github.com/nazmul-nhb/toolbox-x/commit/bde1e98b99)] - 🔧 update(string): updated `MaskOptions` for `maskString` (Nazmul Hassan)
13
+ * \[[`bdeea053f1`](https://github.com/nazmul-nhb/toolbox-x/commit/bdeea053f1)] - 📚 docs: updated CHANGELOG.md for v2.4.4 (github-actions\[bot])
14
+
15
+ ## [v2.4.4](https://github.com/nazmul-nhb/toolbox-x/releases/tag/v2.4.4) — 2026-06-28
16
+
17
+ [Compare changes](https://github.com/nazmul-nhb/toolbox-x/compare/v2.4.2...v2.4.4)
18
+
19
+ * \[[`5565185e11`](https://github.com/nazmul-nhb/toolbox-x/commit/5565185e11)] - 🧼 refactor(date): all conversion into `Date` object is now immutable (Nazmul Hassan)
20
+ * \[[`592d976acc`](https://github.com/nazmul-nhb/toolbox-x/commit/592d976acc)] - 🛠️ chore: updated editor config and deps (Nazmul Hassan)
21
+ * \[[`a3b28009a8`](https://github.com/nazmul-nhb/toolbox-x/commit/a3b28009a8)] - 🔧 update(docs): updated docs for `addDate` (Nazmul Hassan)
22
+ * \[[`0f6476e6b0`](https://github.com/nazmul-nhb/toolbox-x/commit/0f6476e6b0)] - 🔧 update(package.json): added more keywords (Nazmul Hassan)
23
+ * \[[`d1c6ff4282`](https://github.com/nazmul-nhb/toolbox-x/commit/d1c6ff4282)] - 🔧 update(docs): updated docs for natural sort utility (Nazmul Hassan)
24
+ * \[[`56a8e690d5`](https://github.com/nazmul-nhb/toolbox-x/commit/56a8e690d5)] - 📚 docs: updated CHANGELOG.md for v2.4.2 (github-actions\[bot])
25
+
7
26
  ## [v2.4.2](https://github.com/nazmul-nhb/toolbox-x/releases/tag/v2.4.2) — 2026-06-17
8
27
 
9
28
  [Compare changes](https://github.com/nazmul-nhb/toolbox-x/compare/v2.4.1...v2.4.2)
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  const require_primitives = require('./primitives-CBGICrDR.cjs');
18
- const require_utils = require('./utils-C4yOIzOJ.cjs');
19
18
  const require_specials = require('./specials-DU8u108m.cjs');
19
+ const require_utils = require('./utils-BzeK3wO9.cjs');
20
20
  const require_utilities = require('./utilities-_COSGq1U.cjs');
21
21
 
22
22
  //#region src/string/convert.ts
@@ -34,7 +34,7 @@ const require_utilities = require('./utilities-_COSGq1U.cjs');
34
34
  */
35
35
  const replaceAllInString = (input, find, replace) => {
36
36
  const trimmedString = require_utils.trimString(input);
37
- const regex = require_primitives.isString(find) ? new RegExp(find, "g") : new RegExp(find, find?.flags.includes("g") ? find?.flags : find?.flags + "g");
37
+ const regex = require_primitives.isString(find) ? new RegExp(find, "g") : new RegExp(find, find?.flags.includes("g") ? find?.flags : `${find?.flags}g`);
38
38
  return trimmedString?.replace(regex, replace);
39
39
  };
40
40
  /**
@@ -52,10 +52,10 @@ const slugifyString = (input) => {
52
52
  * @returns The masked string.
53
53
  */
54
54
  const maskString = (input, options) => {
55
- const { start = 1, end = 1, maskCharacter: maskChar = "*" } = options || {};
56
- const trimmedString = require_utils.trimString(input);
57
- if (trimmedString?.length <= start + end) return maskChar?.repeat(trimmedString?.length);
58
- return trimmedString.slice(0, start) + maskChar?.repeat(trimmedString?.length - start - end) + (end > 0 ? trimmedString.slice(-end) : "");
55
+ const { start = 1, end = 1, trim = false, maskCharacter = "*" } = options || {};
56
+ const trimmedString = trim ? require_utils.trimString(input) : input;
57
+ if (trimmedString?.length <= start + end) return maskCharacter?.repeat(trimmedString?.length);
58
+ return trimmedString.slice(0, start) + maskCharacter?.repeat(trimmedString?.length - start - end) + (end > 0 ? trimmedString.slice(-end) : "");
59
59
  };
60
60
  /**
61
61
  * * Reverses a given string.
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  import { d as isString, m as isUndefined } from "./primitives-Djsevc69.mjs";
18
- import { $ as trimString, m as stableStringify } from "./utils-C0NzTJMR.mjs";
19
18
  import { b as isFunction, w as isNotEmptyObject } from "./specials-krf7zsqI.mjs";
19
+ import { $ as trimString, m as stableStringify } from "./utils-DnyVgO8p.mjs";
20
20
  import { a as normalizeNumber } from "./utilities-CmPwOkdy.mjs";
21
21
 
22
22
  //#region src/string/convert.ts
@@ -34,7 +34,7 @@ import { a as normalizeNumber } from "./utilities-CmPwOkdy.mjs";
34
34
  */
35
35
  const replaceAllInString = (input, find, replace) => {
36
36
  const trimmedString = trimString(input);
37
- const regex = isString(find) ? new RegExp(find, "g") : new RegExp(find, find?.flags.includes("g") ? find?.flags : find?.flags + "g");
37
+ const regex = isString(find) ? new RegExp(find, "g") : new RegExp(find, find?.flags.includes("g") ? find?.flags : `${find?.flags}g`);
38
38
  return trimmedString?.replace(regex, replace);
39
39
  };
40
40
  /**
@@ -52,10 +52,10 @@ const slugifyString = (input) => {
52
52
  * @returns The masked string.
53
53
  */
54
54
  const maskString = (input, options) => {
55
- const { start = 1, end = 1, maskCharacter: maskChar = "*" } = options || {};
56
- const trimmedString = trimString(input);
57
- if (trimmedString?.length <= start + end) return maskChar?.repeat(trimmedString?.length);
58
- return trimmedString.slice(0, start) + maskChar?.repeat(trimmedString?.length - start - end) + (end > 0 ? trimmedString.slice(-end) : "");
55
+ const { start = 1, end = 1, trim = false, maskCharacter = "*" } = options || {};
56
+ const trimmedString = trim ? trimString(input) : input;
57
+ if (trimmedString?.length <= start + end) return maskCharacter?.repeat(trimmedString?.length);
58
+ return trimmedString.slice(0, start) + maskCharacter?.repeat(trimmedString?.length - start - end) + (end > 0 ? trimmedString.slice(-end) : "");
59
59
  };
60
60
  /**
61
61
  * * Reverses a given string.
@@ -14,17 +14,25 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { z as RandomIdOptions } from "./string-edtZyJHf.mjs";
17
+ import { J as TruncateOptions, z as RandomIdOptions } from "./string-D7N_U6y2.mjs";
18
18
 
19
19
  //#region src/string/basics.d.ts
20
20
  /**
21
21
  * * Utility to truncate a string to a specified length.
22
22
  *
23
23
  * @param str The string to truncate.
24
- * @param maxLength The maximum length of the truncated string.
25
- * @returns Truncated string with ellipsis (`...`) (only if it has more length than `maxLength`).
24
+ * @param maxLength The maximum length of the truncated string. Defaults to `100`.
25
+ * @returns Truncated string with ellipsis (`'...'`) (only if it has more length than `maxLength`).
26
26
  */
27
- declare function truncateString(str: string, maxLength: number): string;
27
+ declare function truncateString(str: string, maxLength?: number): string;
28
+ /**
29
+ * * Utility to truncate a string to a specified length using options.
30
+ *
31
+ * @param str The string to truncate.
32
+ * @param options Options for truncating the string.
33
+ * @returns Truncated string based on the {@link options}.
34
+ */
35
+ declare function truncateString(str: string, options?: TruncateOptions): string;
28
36
  /**
29
37
  * * Generates a random alphanumeric (16 characters long, this length is customizable in the options) ID string composed of an optional `prefix`, `suffix`, a `timestamp`, `caseOption` and a customizable `separator`.
30
38
  *
@@ -32,6 +40,7 @@ declare function truncateString(str: string, maxLength: number): string;
32
40
  * @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
33
41
  *
34
42
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/uuid uuid} for `uuid` generation
43
+ * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-numeric randomHex} for random numeric string generation
35
44
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-hex randomHex} for random hexadecimal string generation
36
45
  *
37
46
  * @example
@@ -14,17 +14,25 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { z as RandomIdOptions } from "./string-Ok_IMpHP.cjs";
17
+ import { J as TruncateOptions, z as RandomIdOptions } from "./string-Cm9AMOl_.cjs";
18
18
 
19
19
  //#region src/string/basics.d.ts
20
20
  /**
21
21
  * * Utility to truncate a string to a specified length.
22
22
  *
23
23
  * @param str The string to truncate.
24
- * @param maxLength The maximum length of the truncated string.
25
- * @returns Truncated string with ellipsis (`...`) (only if it has more length than `maxLength`).
24
+ * @param maxLength The maximum length of the truncated string. Defaults to `100`.
25
+ * @returns Truncated string with ellipsis (`'...'`) (only if it has more length than `maxLength`).
26
26
  */
27
- declare function truncateString(str: string, maxLength: number): string;
27
+ declare function truncateString(str: string, maxLength?: number): string;
28
+ /**
29
+ * * Utility to truncate a string to a specified length using options.
30
+ *
31
+ * @param str The string to truncate.
32
+ * @param options Options for truncating the string.
33
+ * @returns Truncated string based on the {@link options}.
34
+ */
35
+ declare function truncateString(str: string, options?: TruncateOptions): string;
28
36
  /**
29
37
  * * Generates a random alphanumeric (16 characters long, this length is customizable in the options) ID string composed of an optional `prefix`, `suffix`, a `timestamp`, `caseOption` and a customizable `separator`.
30
38
  *
@@ -32,6 +40,7 @@ declare function truncateString(str: string, maxLength: number): string;
32
40
  * @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
33
41
  *
34
42
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/uuid uuid} for `uuid` generation
43
+ * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-numeric randomHex} for random numeric string generation
35
44
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-hex randomHex} for random hexadecimal string generation
36
45
  *
37
46
  * @example
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, K as TrainCase, L as PathCase, N as KebabCase, V as SentenceCase, W as StringCaseOptions, g as CaseFormat, h as CapitalizeOptions, k as DotCase, m as CamelCase, u as $WidenEmpty, v as ConstantCase } from "./string-Ok_IMpHP.cjs";
17
+ import { F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, K as TrainCase, L as PathCase, N as KebabCase, V as SentenceCase, W as StringCaseOptions, g as CaseFormat, h as CapitalizeOptions, k as DotCase, m as CamelCase, u as $WidenEmpty, v as ConstantCase } from "./string-Cm9AMOl_.cjs";
18
18
 
19
19
  //#region src/string/case.d.ts
20
20
  /**
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, K as TrainCase, L as PathCase, N as KebabCase, V as SentenceCase, W as StringCaseOptions, g as CaseFormat, h as CapitalizeOptions, k as DotCase, m as CamelCase, u as $WidenEmpty, v as ConstantCase } from "./string-edtZyJHf.mjs";
17
+ import { F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, K as TrainCase, L as PathCase, N as KebabCase, V as SentenceCase, W as StringCaseOptions, g as CaseFormat, h as CapitalizeOptions, k as DotCase, m as CamelCase, u as $WidenEmpty, v as ConstantCase } from "./string-D7N_U6y2.mjs";
18
18
 
19
19
  //#region src/string/case.d.ts
20
20
  /**
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-BmB2aGyp.cjs";
17
+ import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-Be3-bSPx.cjs";
18
18
  export { capitalizeString, convertStringCase, toCamelCase, toConstantCase, toDotCase, toKebabCase, toPascalCase, toPascalSnakeCase, toPathCase, toSentenceCase, toSnakeCase, toTitleCase, toTrainCase };
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-Ce8HJI8I.mjs";
17
+ import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-q0o80oIc.mjs";
18
18
  export { capitalizeString, convertStringCase, toCamelCase, toConstantCase, toDotCase, toKebabCase, toPascalCase, toPascalSnakeCase, toPathCase, toSentenceCase, toSnakeCase, toTitleCase, toTrainCase };
@@ -123,12 +123,12 @@ const IRREGULAR_PLURALS = /* @__PURE__ */ Object.freeze({
123
123
  millennium: "millennia",
124
124
  century: "centuries"
125
125
  });
126
- const INVARIANT_UNITS = /* @__PURE__ */ Object.freeze(new Set([
126
+ const INVARIANT_UNITS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ new Set([
127
127
  "celsius",
128
128
  "fahrenheit",
129
129
  "kelvin"
130
130
  ]));
131
- const Y_TO_IES = /* @__PURE__ */ Object.freeze(new Set(["century"]));
131
+ const Y_TO_IES = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ new Set(["century"]));
132
132
 
133
133
  //#endregion
134
134
  export { Y_TO_IES as i, IRREGULAR_PLURALS as n, UNITS as r, INVARIANT_UNITS as t };
@@ -124,12 +124,12 @@ const IRREGULAR_PLURALS = /* @__PURE__ */ Object.freeze({
124
124
  millennium: "millennia",
125
125
  century: "centuries"
126
126
  });
127
- const INVARIANT_UNITS = /* @__PURE__ */ Object.freeze(new Set([
127
+ const INVARIANT_UNITS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ new Set([
128
128
  "celsius",
129
129
  "fahrenheit",
130
130
  "kelvin"
131
131
  ]));
132
- const Y_TO_IES = /* @__PURE__ */ Object.freeze(new Set(["century"]));
132
+ const Y_TO_IES = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ new Set(["century"]));
133
133
 
134
134
  //#endregion
135
135
  Object.defineProperty(exports, 'INVARIANT_UNITS', {
@@ -21,7 +21,7 @@ const require_timezone = require('./timezone-CSz7R0L6.cjs');
21
21
  const require_constants$2 = require('./constants-BOs8tjzp.cjs');
22
22
  const require_css_colors = require('./css-colors-DC7oZ46Y.cjs');
23
23
  const require_constants$3 = require('./constants-B3nc8psr.cjs');
24
- const require_constants$4 = require('./constants-DIBRCBIP.cjs');
24
+ const require_constants$4 = require('./constants-BUJG8exj.cjs');
25
25
  const require_countries = require('./countries-C0x58zVg.cjs');
26
26
  const require_constants$5 = require('./constants-ZnFGKd7G.cjs');
27
27
 
@@ -20,7 +20,7 @@ import { a as TIME_ZONE_IDS, i as TIME_ZONES_NATIVE, n as NATIVE_TZ_IDS, o as TI
20
20
  import { n as NUMBER_COLOR_PALETTE, t as ALPHABET_COLOR_PALETTE } from "./constants-DCZL77t-.mjs";
21
21
  import { t as CSS_COLORS } from "./css-colors-B-y4TmeC.mjs";
22
22
  import { a as LOCALE_CODES, i as FRANKFURTER_CURRENCIES, n as CURRENCY_CODES, p as UNITS$1, r as CURRENCY_LOCALES } from "./constants-ZyfpysiQ.mjs";
23
- import { r as UNITS } from "./constants-ByLTHWQm.mjs";
23
+ import { r as UNITS } from "./constants-B6yqsqJ5.mjs";
24
24
  import { t as COUNTRIES } from "./countries-CMxHxKiK.mjs";
25
25
  import { t as HTTP_STATUS_CODES } from "./constants-BLAcLxOu.mjs";
26
26
 
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
- const require_constants = require('../constants-DIBRCBIP.cjs');
18
+ const require_constants = require('../constants-BUJG8exj.cjs');
19
19
 
20
20
  //#region src/converter/base.ts
21
21
  /**
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { i as Y_TO_IES, n as IRREGULAR_PLURALS, r as UNITS, t as INVARIANT_UNITS } from "../constants-ByLTHWQm.mjs";
17
+ import { i as Y_TO_IES, n as IRREGULAR_PLURALS, r as UNITS, t as INVARIANT_UNITS } from "../constants-B6yqsqJ5.mjs";
18
18
 
19
19
  //#region src/converter/base.ts
20
20
  /**
@@ -20,8 +20,8 @@ const require_constants = require('../constants-CgFaV72Z.cjs');
20
20
  const require_timezone = require('../timezone-CSz7R0L6.cjs');
21
21
  const require_specials = require('../specials-DU8u108m.cjs');
22
22
  const require_utilities = require('../utilities-_COSGq1U.cjs');
23
- const require_guards = require('../guards-BD2Fkugj.cjs');
24
- const require_parse = require('../parse-CffWYCuy.cjs');
23
+ const require_guards = require('../guards-DalSfIxV.cjs');
24
+ const require_parse = require('../parse-Dz186-PH.cjs');
25
25
 
26
26
  //#region src/date/calculation.ts
27
27
  /**
@@ -47,9 +47,8 @@ const require_parse = require('../parse-CffWYCuy.cjs');
47
47
  * ```
48
48
  */
49
49
  function addDate(date, units) {
50
- const $date = require_parse._dateArgsToDate(date);
51
- if (Number.isNaN($date.getTime())) throw new TypeError("Provided date is invalid!");
52
- const expected = new Date($date);
50
+ const expected = require_parse._dateArgsToDate(date);
51
+ if (Number.isNaN(expected.getTime())) throw new TypeError("Provided date is invalid!");
53
52
  for (const [unit, value] of Object.entries(units)) {
54
53
  const val = require_utilities.normalizeNumber(value);
55
54
  if (!require_specials.isObjectWithKeys(require_constants.DATE_UNIT_SETTERS, [unit]) || !require_primitives.isNumber(val)) throw new TypeError(`Provided unit or value is invalid!`);
@@ -19,8 +19,8 @@ import { a as RELATIVE_TIME_DIVISIONS, t as DATE_UNIT_SETTERS } from "../constan
19
19
  import { n as NATIVE_TZ_IDS } from "../timezone-avZ4TvDx.mjs";
20
20
  import { E as isObjectWithKeys, T as isObject } from "../specials-krf7zsqI.mjs";
21
21
  import { a as normalizeNumber } from "../utilities-CmPwOkdy.mjs";
22
- import { a as isValidTime, s as isValidUTCOffset } from "../guards-DBunDnng.mjs";
23
- import { a as _normalizeOffset, i as _gmtToUtcOffset, n as _dateArgsToDate, o as _resolveNativeTzName, r as _formatDate, t as parseMSec } from "../parse-CILDG7TG.mjs";
22
+ import { a as isValidTime, s as isValidUTCOffset } from "../guards-CyOZsZ1r.mjs";
23
+ import { a as _normalizeOffset, i as _gmtToUtcOffset, n as _dateArgsToDate, o as _resolveNativeTzName, r as _formatDate, t as parseMSec } from "../parse-CsTFudDu.mjs";
24
24
 
25
25
  //#region src/date/calculation.ts
26
26
  /**
@@ -46,9 +46,8 @@ import { a as _normalizeOffset, i as _gmtToUtcOffset, n as _dateArgsToDate, o as
46
46
  * ```
47
47
  */
48
48
  function addDate(date, units) {
49
- const $date = _dateArgsToDate(date);
50
- if (Number.isNaN($date.getTime())) throw new TypeError("Provided date is invalid!");
51
- const expected = new Date($date);
49
+ const expected = _dateArgsToDate(date);
50
+ if (Number.isNaN(expected.getTime())) throw new TypeError("Provided date is invalid!");
52
51
  for (const [unit, value] of Object.entries(units)) {
53
52
  const val = normalizeNumber(value);
54
53
  if (!isObjectWithKeys(DATE_UNIT_SETTERS, [unit]) || !isNumber(val)) throw new TypeError(`Provided unit or value is invalid!`);
@@ -16,10 +16,10 @@
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
18
  const require_primitives = require('../primitives-CBGICrDR.cjs');
19
- const require_utils = require('../utils-C4yOIzOJ.cjs');
20
19
  const require_specials = require('../specials-DU8u108m.cjs');
21
- const require_guards = require('../guards-BD2Fkugj.cjs');
22
- const require_query = require('../query-lGVoAJl3.cjs');
20
+ const require_utils = require('../utils-BzeK3wO9.cjs');
21
+ const require_guards = require('../guards-DalSfIxV.cjs');
22
+ const require_query = require('../query-Bo-_PC3j.cjs');
23
23
 
24
24
  //#region src/dom/storage.ts
25
25
  /**
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  import { J as Deserializer, ft as Serializer, y as GenericObject } from "../object-DyVg8BFt.cjs";
18
- import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-BMtRmMSC.cjs";
19
- import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-DhsFvo_D.cjs";
18
+ import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-Cih_n7VU.cjs";
19
+ import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-cW0-Ichd.cjs";
20
20
 
21
21
  //#region src/dom/storage.d.ts
22
22
  /**
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  import { J as Deserializer, ft as Serializer, y as GenericObject } from "../object-DyVg8BFt.mjs";
18
- import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-C-r5ZbO-.mjs";
19
- import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-D_5I437n.mjs";
18
+ import { a as updateQueryParam, i as parseQueryStringLiteral, n as getQueryParams, r as parseQueryString, t as generateQueryParams } from "../query-DNJK9kPd.mjs";
19
+ import { a as OriginFileObj, i as FormDataConfigs, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-CDTwFDkB.mjs";
20
20
 
21
21
  //#region src/dom/storage.d.ts
22
22
  /**
@@ -15,10 +15,10 @@
15
15
  */
16
16
 
17
17
  import { a as isNonEmptyString, d as isString } from "../primitives-Djsevc69.mjs";
18
- import { $ as trimString } from "../utils-C0NzTJMR.mjs";
19
18
  import { j as isValidArray, v as isEmptyObject, w as isNotEmptyObject } from "../specials-krf7zsqI.mjs";
20
- import { t as isDateLike } from "../guards-DBunDnng.mjs";
21
- import { C as isValidFormData, S as isOriginFileObj, _ as isCustomFileArray, a as updateQueryParam, b as isFileOrBlob, g as isCustomFile, i as parseQueryStringLiteral, m as parseObjectValues, n as getQueryParams, r as parseQueryString, t as generateQueryParams, v as isFileArray, x as isFileUpload, y as isFileList } from "../query-Cp1dq-qU.mjs";
19
+ import { $ as trimString } from "../utils-DnyVgO8p.mjs";
20
+ import { t as isDateLike } from "../guards-CyOZsZ1r.mjs";
21
+ import { C as isValidFormData, S as isOriginFileObj, _ as isCustomFileArray, a as updateQueryParam, b as isFileOrBlob, g as isCustomFile, i as parseQueryStringLiteral, m as parseObjectValues, n as getQueryParams, r as parseQueryString, t as generateQueryParams, v as isFileArray, x as isFileUpload, y as isFileList } from "../query-CLkSagHs.mjs";
22
22
 
23
23
  //#region src/dom/storage.ts
24
24
  /**
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { S as KeyForObject, T as NestedKeyString, ai as RequireExactly, at as NormalPrimitive, u as DotNotationKey, x as KeyForArray } from "./object-DyVg8BFt.mjs";
18
- import { R as QueryString } from "./string-edtZyJHf.mjs";
18
+ import { R as QueryString } from "./string-D7N_U6y2.mjs";
19
19
  import { f as TypeOrArray } from "./array-CbAKXvhH.mjs";
20
20
 
21
21
  //#region src/types/form.d.ts
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { S as KeyForObject, T as NestedKeyString, ai as RequireExactly, at as NormalPrimitive, u as DotNotationKey, x as KeyForArray } from "./object-DyVg8BFt.cjs";
18
- import { R as QueryString } from "./string-Ok_IMpHP.cjs";
18
+ import { R as QueryString } from "./string-Cm9AMOl_.cjs";
19
19
  import { f as TypeOrArray } from "./array-EVkwcL_k.cjs";
20
20
 
21
21
  //#region src/types/form.d.ts
@@ -16,11 +16,11 @@
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
18
  const require_primitives = require('../primitives-CBGICrDR.cjs');
19
- const require_utils = require('../utils-C4yOIzOJ.cjs');
20
19
  const require_specials = require('../specials-DU8u108m.cjs');
21
- const require_basics = require('../basics-CiT7tnu_.cjs');
20
+ const require_utils = require('../utils-BzeK3wO9.cjs');
21
+ const require_basics = require('../basics-BGu9ygZK.cjs');
22
22
  const require_guards = require('../guards-CrfVwk0-.cjs');
23
- const require_guards$1 = require('../guards-BD2Fkugj.cjs');
23
+ const require_guards$1 = require('../guards-DalSfIxV.cjs');
24
24
 
25
25
  exports.areInvalidNumbers = require_basics.areInvalidNumbers;
26
26
  exports.areNumbersInvalid = require_basics.areInvalidNumbers;
@@ -15,10 +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 { C as isUUIDv2, D as isUUIDv6, E as isUUIDv5, O as isUUIDv7, S as isUUIDv1, T as isUUIDv4, f as isDeepEqual, k as isUUIDv8, w as isUUIDv3 } from "../utils-C0NzTJMR.mjs";
19
18
  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 { C as isOdd, S as isMultiple, b as isEven, d as isCamelCase, f as isEmojiOnly, g as isSnakeCase, h as isPascalCase, i as isInvalidOrEmptyArray, m as isPalindrome, p as isKebabCase, v as isPrime, w as isPerfectSquare, x as isFibonacci, y as areInvalidNumbers } from "../basics-9MqP9Ecm.mjs";
19
+ import { C as isUUIDv2, D as isUUIDv6, E as isUUIDv5, O as isUUIDv7, S as isUUIDv1, T as isUUIDv4, f as isDeepEqual, k as isUUIDv8, w as isUUIDv3 } from "../utils-DnyVgO8p.mjs";
20
+ import { C as isOdd, S as isMultiple, b as isEven, d as isCamelCase, f as isEmojiOnly, g as isSnakeCase, h as isPascalCase, i as isInvalidOrEmptyArray, m as isPalindrome, p as isKebabCase, v as isPrime, w as isPerfectSquare, x as isFibonacci, y as areInvalidNumbers } from "../basics-Bd2mj0uG.mjs";
21
21
  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";
22
- import { a as isValidTime, i as isTimeWithUnit, n as isLeapYear, o as isValidTimeZoneId, r as isNativeTimeZoneId, s as isValidUTCOffset, t as isDateLike } from "../guards-DBunDnng.mjs";
22
+ import { a as isValidTime, i as isTimeWithUnit, n as isLeapYear, o as isValidTimeZoneId, r as isNativeTimeZoneId, s as isValidUTCOffset, t as isDateLike } from "../guards-CyOZsZ1r.mjs";
23
23
 
24
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 };
@@ -54,7 +54,7 @@ function isValidUTCOffset(value) {
54
54
  * @returns `true` if the value is a valid IANA time zone identifier, otherwise `false`.
55
55
  */
56
56
  function isValidTimeZoneId(value) {
57
- return isNonEmptyString(value) ? new Set([...IANA_TZ_IDS]).has(value) : false;
57
+ return isNonEmptyString(value) ? (/* @__PURE__ */ new Set([...IANA_TZ_IDS])).has(value) : false;
58
58
  }
59
59
  /**
60
60
  * * Validates whether the provided value is a supported time zone identifier using the native JavaScript API (`Intl.supportedValuesOf('timeZone')`).
@@ -54,7 +54,7 @@ function isValidUTCOffset(value) {
54
54
  * @returns `true` if the value is a valid IANA time zone identifier, otherwise `false`.
55
55
  */
56
56
  function isValidTimeZoneId(value) {
57
- return require_primitives.isNonEmptyString(value) ? new Set([...require_timezone.IANA_TZ_IDS]).has(value) : false;
57
+ return require_primitives.isNonEmptyString(value) ? (/* @__PURE__ */ new Set([...require_timezone.IANA_TZ_IDS])).has(value) : false;
58
58
  }
59
59
  /**
60
60
  * * Validates whether the provided value is a supported time zone identifier using the native JavaScript API (`Intl.supportedValuesOf('timeZone')`).
@@ -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_utils = require('../utils-C4yOIzOJ.cjs');
20
19
  const require_specials = require('../specials-DU8u108m.cjs');
21
- const require_parse = require('../parse-CffWYCuy.cjs');
20
+ const require_utils = require('../utils-BzeK3wO9.cjs');
21
+ const require_parse = require('../parse-Dz186-PH.cjs');
22
22
 
23
23
  //#region src/hash/Cipher.ts
24
24
  /**
@@ -17,7 +17,7 @@
17
17
  import { nt as Maybe, y as GenericObject } from "../object-DyVg8BFt.cjs";
18
18
  import { _ as VerifiedToken, d as SignetPayload, l as SignOptions, p as TokenString, s as DecodedToken, v as VerifyOptions } from "../hash-DHawpylk.cjs";
19
19
  import { a as isUUIDv4, c as isUUIDv7, i as isUUIDv3, l as isUUIDv8, n as isUUIDv1, o as isUUIDv5, r as isUUIDv2, s as isUUIDv6, t as decodeUUID, u as uuid, w as isUUID } from "../uuid-CMNRM9NO.cjs";
20
- import { t as generateRandomID } from "../basics-CLwtIxap.cjs";
20
+ import { t as generateRandomID } from "../basics-lvlgIf5Y.cjs";
21
21
 
22
22
  //#region src/hash/Cipher.d.ts
23
23
  /**
@@ -17,7 +17,7 @@
17
17
  import { nt as Maybe, y as GenericObject } from "../object-DyVg8BFt.mjs";
18
18
  import { _ as VerifiedToken, d as SignetPayload, l as SignOptions, p as TokenString, s as DecodedToken, v as VerifyOptions } from "../hash-2mygGWLk.mjs";
19
19
  import { a as isUUIDv4, c as isUUIDv7, i as isUUIDv3, l as isUUIDv8, n as isUUIDv1, o as isUUIDv5, r as isUUIDv2, s as isUUIDv6, t as decodeUUID, u as uuid, w as isUUID } from "../uuid-DvQsIl9p.mjs";
20
- import { t as generateRandomID } from "../basics-BuHQJCNG.mjs";
20
+ import { t as generateRandomID } from "../basics-D64kohDf.mjs";
21
21
 
22
22
  //#region src/hash/Cipher.d.ts
23
23
  /**
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  import { a as isNonEmptyString } from "../primitives-Djsevc69.mjs";
18
- import { A as uuid, B as bytesToUtf8, C as isUUIDv2, D as isUUIDv6, E as isUUIDv5, F as _padStartWith0, G as randomAlphaNumeric, H as hexToBytes, I as _splitByCharLength, J as randomNumeric, K as randomBytes, L as base64ToBytes, M as sha1, N as sha256, O as isUUIDv7, P as _constantTimeEquals, Q as generateRandomID, R as bytesToBase64, S as isUUIDv1, T as isUUIDv4, U as hmacSha256, V as concatBytes, W as intTo4BytesBE, X as uint8To32ArrayBE, Y as sha256Bytes, Z as utf8ToBytes, h as stripJsonEdgeGarbage, j as md5, k as isUUIDv8, m as stableStringify, q as randomHex, w as isUUIDv3, x as decodeUUID, z as bytesToHex } from "../utils-C0NzTJMR.mjs";
19
18
  import { c as isHexString, m as isUUID, n as isBinaryString, t as isBase64, w as isNotEmptyObject } from "../specials-krf7zsqI.mjs";
20
- import { c as _toSeconds, s as _secToDate, t as parseMSec } from "../parse-CILDG7TG.mjs";
19
+ import { A as uuid, B as bytesToUtf8, C as isUUIDv2, D as isUUIDv6, E as isUUIDv5, F as _padStartWith0, G as randomAlphaNumeric, H as hexToBytes, I as _splitByCharLength, J as randomNumeric, K as randomBytes, L as base64ToBytes, M as sha1, N as sha256, O as isUUIDv7, P as _constantTimeEquals, Q as generateRandomID, R as bytesToBase64, S as isUUIDv1, T as isUUIDv4, U as hmacSha256, V as concatBytes, W as intTo4BytesBE, X as uint8To32ArrayBE, Y as sha256Bytes, Z as utf8ToBytes, h as stripJsonEdgeGarbage, j as md5, k as isUUIDv8, m as stableStringify, q as randomHex, w as isUUIDv3, x as decodeUUID, z as bytesToHex } from "../utils-DnyVgO8p.mjs";
20
+ import { c as _toSeconds, s as _secToDate, t as parseMSec } from "../parse-CsTFudDu.mjs";
21
21
 
22
22
  //#region src/hash/Cipher.ts
23
23
  /**
package/dist/index.cjs CHANGED
@@ -19,11 +19,11 @@ const require_primitives = require('./primitives-CBGICrDR.cjs');
19
19
  const require_case = require('./case-Bd7QLHYw.cjs');
20
20
  const require_constants = require('./constants-B3nc8psr.cjs');
21
21
  const require_countries = require('./countries-C0x58zVg.cjs');
22
- const require_utils = require('./utils-C4yOIzOJ.cjs');
23
22
  const require_specials = require('./specials-DU8u108m.cjs');
24
- const require_basics = require('./basics-CiT7tnu_.cjs');
23
+ const require_utils = require('./utils-BzeK3wO9.cjs');
24
+ const require_basics = require('./basics-BGu9ygZK.cjs');
25
25
  const require_utilities = require('./utilities-_COSGq1U.cjs');
26
- const require_query = require('./query-lGVoAJl3.cjs');
26
+ const require_query = require('./query-Bo-_PC3j.cjs');
27
27
 
28
28
  //#region src/string/anagram.ts
29
29
  /** `WeakMap` to cache user provided dictionary array */
@@ -529,7 +529,7 @@ function getFactors(int) {
529
529
  const num = require_utilities.normalizeNumber(int);
530
530
  if (!require_primitives.isNumber(num) || num <= 0 || !Number.isInteger(num)) return [];
531
531
  if (num === 1) return [1];
532
- const factors = new Set([1, num]);
532
+ const factors = /* @__PURE__ */ new Set([1, num]);
533
533
  const sqrt = Math.floor(Math.sqrt(num));
534
534
  for (let i = 2; i <= sqrt; i++) if (num % i === 0) {
535
535
  factors.add(i);
@@ -1255,7 +1255,7 @@ function getFibonacciSeriesMemo(limit) {
1255
1255
  const cLimit = Number(limit);
1256
1256
  if (!Number.isFinite(cLimit) || cLimit <= 0) return [];
1257
1257
  if (cLimit === 1) return [0];
1258
- const memo = new Map([[0, 0], [1, 1]]);
1258
+ const memo = /* @__PURE__ */ new Map([[0, 0], [1, 1]]);
1259
1259
  const fib = (n) => {
1260
1260
  if (memo.has(n)) return memo.get(n);
1261
1261
  const val = fib(n - 1) + fib(n - 2);
package/dist/index.d.cts CHANGED
@@ -15,12 +15,12 @@
15
15
  */
16
16
 
17
17
  import { $n as NumberType, Bn as DecimalOptions, D as NumericDotKey, E as NestedPrimitiveKey, F as SanitizeOptions, I as SanitizedData, In as BnDigitResult, Ln as ConvertOptions, O as ObjectEntry, Q as FlattenPartial, Rn as ConvertedDecimal, Un as FrankFurterCurrency, V as BasicPrimitive, Xn as LocaleCode, Zn as LooseRomanNumeral, a as ConvertObjectOptions, ar as RomanCapital, c as DeepKeys, ci as Tuple, ct as Numeric, g as FlattenDotValue, ir as RangedNumbers, k as Objects, lt as OwnKeys, nr as RandomNumberOptions, nt as Maybe, o as ConvertedObject, p as ExpandAll, pi as Unit, rr as RangeOptions, s as CountryDetails, tr as PercentageOptions, u as DotNotationKey, ut as PartialOrRequired, v as FlattenLeafValue, w as MergeAll, y as GenericObject, z as Any, zn as CurrencyCode } from "./object-DyVg8BFt.cjs";
18
- import { D as DiffResult, P as MaskOptions, _ as CharDiffResult, p as AnagramOptions } from "./string-Ok_IMpHP.cjs";
19
- import { n as convertStringCase, t as capitalizeString } from "./case-BmB2aGyp.cjs";
20
- import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-BMtRmMSC.cjs";
18
+ import { D as DiffResult, P as MaskOptions, _ as CharDiffResult, p as AnagramOptions } from "./string-Cm9AMOl_.cjs";
19
+ import { n as convertStringCase, t as capitalizeString } from "./case-Be3-bSPx.cjs";
20
+ import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-Cih_n7VU.cjs";
21
21
  import { c as OrderOption, l as SortByOption, n as FindOptions, s as OptionsConfig, t as FieldValue, u as SortNature } from "./array-EVkwcL_k.cjs";
22
22
  import { C as shuffleArray, S as isInvalidOrEmptyArray, _ as findPrimeNumbers, a as deepParsePrimitives, b as flattenArray, c as getInstanceGetterNames, d as getStaticMethodNames, f as isDeepEqual, g as throttleAction, h as stripJsonEdgeGarbage, i as debounceAction, l as getInstanceMethodNames, m as stableStringify, n as countInstanceMethods, o as definePrototypeMethod, p as parseJSON, r as countStaticMethods, s as getClassDetails, t as convertArrayToString, u as getStaticGetterNames, v as isPrime, x as getLastArrayElement, y as filterArrayOfObjects } from "./index-D00Uqm9S.cjs";
23
- import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-CLwtIxap.cjs";
23
+ import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-lvlgIf5Y.cjs";
24
24
 
25
25
  //#region src/string/anagram.d.ts
26
26
  /**
package/dist/index.d.mts CHANGED
@@ -15,12 +15,12 @@
15
15
  */
16
16
 
17
17
  import { $n as NumberType, Bn as DecimalOptions, D as NumericDotKey, E as NestedPrimitiveKey, F as SanitizeOptions, I as SanitizedData, In as BnDigitResult, Ln as ConvertOptions, O as ObjectEntry, Q as FlattenPartial, Rn as ConvertedDecimal, Un as FrankFurterCurrency, V as BasicPrimitive, Xn as LocaleCode, Zn as LooseRomanNumeral, a as ConvertObjectOptions, ar as RomanCapital, c as DeepKeys, ci as Tuple, ct as Numeric, g as FlattenDotValue, ir as RangedNumbers, k as Objects, lt as OwnKeys, nr as RandomNumberOptions, nt as Maybe, o as ConvertedObject, p as ExpandAll, pi as Unit, rr as RangeOptions, s as CountryDetails, tr as PercentageOptions, u as DotNotationKey, ut as PartialOrRequired, v as FlattenLeafValue, w as MergeAll, y as GenericObject, z as Any, zn as CurrencyCode } from "./object-DyVg8BFt.mjs";
18
- import { D as DiffResult, P as MaskOptions, _ as CharDiffResult, p as AnagramOptions } from "./string-edtZyJHf.mjs";
19
- import { n as convertStringCase, t as capitalizeString } from "./case-Ce8HJI8I.mjs";
20
- import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-C-r5ZbO-.mjs";
18
+ import { D as DiffResult, P as MaskOptions, _ as CharDiffResult, p as AnagramOptions } from "./string-D7N_U6y2.mjs";
19
+ import { n as convertStringCase, t as capitalizeString } from "./case-q0o80oIc.mjs";
20
+ import { i as parseQueryStringLiteral, r as parseQueryString, t as generateQueryParams } from "./query-DNJK9kPd.mjs";
21
21
  import { c as OrderOption, l as SortByOption, n as FindOptions, s as OptionsConfig, t as FieldValue, u as SortNature } from "./array-CbAKXvhH.mjs";
22
22
  import { C as shuffleArray, S as isInvalidOrEmptyArray, _ as findPrimeNumbers, a as deepParsePrimitives, b as flattenArray, c as getInstanceGetterNames, d as getStaticMethodNames, f as isDeepEqual, g as throttleAction, h as stripJsonEdgeGarbage, i as debounceAction, l as getInstanceMethodNames, m as stableStringify, n as countInstanceMethods, o as definePrototypeMethod, p as parseJSON, r as countStaticMethods, s as getClassDetails, t as convertArrayToString, u as getStaticGetterNames, v as isPrime, x as getLastArrayElement, y as filterArrayOfObjects } from "./index-BbBnKdBb.mjs";
23
- import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-BuHQJCNG.mjs";
23
+ import { n as trimString, r as truncateString, t as generateRandomID } from "./basics-D64kohDf.mjs";
24
24
 
25
25
  //#region src/string/anagram.d.ts
26
26
  /**
package/dist/index.mjs CHANGED
@@ -18,11 +18,11 @@ import { a as isNonEmptyString, c as isNumber, d as isString, i as isInteger, m
18
18
  import { n as convertStringCase, t as capitalizeString } from "./case-DBC4Rj0h.mjs";
19
19
  import { c as ORDINAL_UNDER_TEEN, d as TENS, f as THOUSANDS, l as PREFIX_MULTIPLIERS, o as ONES, s as ORDINAL_TO_CARDINAL, t as BN_DIGITS, u as TEENS } from "./constants-ZyfpysiQ.mjs";
20
20
  import { t as COUNTRIES } from "./countries-CMxHxKiK.mjs";
21
- import { $ as trimString, Q as generateRandomID, _ as naturalSort, a as deepParsePrimitives, b as _resolveNestedKey, c as getInstanceGetterNames, d as getStaticMethodNames, et as truncateString, f as isDeepEqual, g as throttleAction, h as stripJsonEdgeGarbage, i as debounceAction, l as getInstanceMethodNames, m as stableStringify, n as countInstanceMethods, o as definePrototypeMethod, p as parseJSON, r as countStaticMethods, s as getClassDetails, t as convertArrayToString, u as getStaticGetterNames, v as sortAnArray, y as _getNumericProp } from "./utils-C0NzTJMR.mjs";
22
21
  import { T as isObject, b as isFunction, d as isNumericString, j as isValidArray } from "./specials-krf7zsqI.mjs";
23
- import { A as replaceAllInString, C as isOdd, D as formatUnitWithPlural, E as extractURLs, M as slugifyString, O as maskString, T as extractEmails, _ as findPrimeNumbers, a as shuffleArray, b as isEven, c as extractObjectEntries, i as isInvalidOrEmptyArray, j as reverseString, k as normalizeString, l as extractObjectKeys, n as flattenArray, o as cloneObject, r as getLastArrayElement, s as countObjectFields, t as filterArrayOfObjects, u as extractObjectKeysDeep, v as isPrime, y as areInvalidNumbers } from "./basics-9MqP9Ecm.mjs";
22
+ import { $ as trimString, Q as generateRandomID, _ as naturalSort, a as deepParsePrimitives, b as _resolveNestedKey, c as getInstanceGetterNames, d as getStaticMethodNames, et as truncateString, f as isDeepEqual, g as throttleAction, h as stripJsonEdgeGarbage, i as debounceAction, l as getInstanceMethodNames, m as stableStringify, n as countInstanceMethods, o as definePrototypeMethod, p as parseJSON, r as countStaticMethods, s as getClassDetails, t as convertArrayToString, u as getStaticGetterNames, v as sortAnArray, y as _getNumericProp } from "./utils-DnyVgO8p.mjs";
23
+ import { A as replaceAllInString, C as isOdd, D as formatUnitWithPlural, E as extractURLs, M as slugifyString, O as maskString, T as extractEmails, _ as findPrimeNumbers, a as shuffleArray, b as isEven, c as extractObjectEntries, i as isInvalidOrEmptyArray, j as reverseString, k as normalizeString, l as extractObjectKeys, n as flattenArray, o as cloneObject, r as getLastArrayElement, s as countObjectFields, t as filterArrayOfObjects, u as extractObjectKeysDeep, v as isPrime, y as areInvalidNumbers } from "./basics-Bd2mj0uG.mjs";
24
24
  import { a as normalizeNumber, i as getRandomFloat, n as formatCurrency, o as roundToNearest, r as getOrdinal, t as clampNumber } from "./utilities-CmPwOkdy.mjs";
25
- import { c as extractUpdatedFields, d as mergeAndFlattenObjects, f as mergeObjects, h as sanitizeData, i as parseQueryStringLiteral, l as flattenObjectDotNotation, m as parseObjectValues, o as extractNewFields, p as parseJsonToObject, r as parseQueryString, s as extractUpdatedAndNewFields, t as generateQueryParams, u as flattenObjectKeyValue } from "./query-Cp1dq-qU.mjs";
25
+ import { c as extractUpdatedFields, d as mergeAndFlattenObjects, f as mergeObjects, h as sanitizeData, i as parseQueryStringLiteral, l as flattenObjectDotNotation, m as parseObjectValues, o as extractNewFields, p as parseJsonToObject, r as parseQueryString, s as extractUpdatedAndNewFields, t as generateQueryParams, u as flattenObjectKeyValue } from "./query-CLkSagHs.mjs";
26
26
 
27
27
  //#region src/string/anagram.ts
28
28
  /** `WeakMap` to cache user provided dictionary array */
@@ -528,7 +528,7 @@ function getFactors(int) {
528
528
  const num = normalizeNumber(int);
529
529
  if (!isNumber(num) || num <= 0 || !Number.isInteger(num)) return [];
530
530
  if (num === 1) return [1];
531
- const factors = new Set([1, num]);
531
+ const factors = /* @__PURE__ */ new Set([1, num]);
532
532
  const sqrt = Math.floor(Math.sqrt(num));
533
533
  for (let i = 2; i <= sqrt; i++) if (num % i === 0) {
534
534
  factors.add(i);
@@ -1254,7 +1254,7 @@ function getFibonacciSeriesMemo(limit) {
1254
1254
  const cLimit = Number(limit);
1255
1255
  if (!Number.isFinite(cLimit) || cLimit <= 0) return [];
1256
1256
  if (cLimit === 1) return [0];
1257
- const memo = new Map([[0, 0], [1, 1]]);
1257
+ const memo = /* @__PURE__ */ new Map([[0, 0], [1, 1]]);
1258
1258
  const fib = (n) => {
1259
1259
  if (memo.has(n)) return memo.get(n);
1260
1260
  const val = fib(n - 1) + fib(n - 2);
@@ -197,7 +197,7 @@ var Paginator = class Paginator {
197
197
  const startPages = _getRange(1, edgeCount);
198
198
  const middlePages = _getRange(start, end);
199
199
  const endPages = _getRange(total - edgeCount + 1, total);
200
- const pages = new Set([
200
+ const pages = /* @__PURE__ */ new Set([
201
201
  ...startPages,
202
202
  ...middlePages,
203
203
  ...endPages
@@ -195,7 +195,7 @@ var Paginator = class Paginator {
195
195
  const startPages = _getRange(1, edgeCount);
196
196
  const middlePages = _getRange(start, end);
197
197
  const endPages = _getRange(total - edgeCount + 1, total);
198
- const pages = new Set([
198
+ const pages = /* @__PURE__ */ new Set([
199
199
  ...startPages,
200
200
  ...middlePages,
201
201
  ...endPages
@@ -18,7 +18,7 @@ import { a as isNonEmptyString, c as isNumber, d as isString } from "./primitive
18
18
  import { i as MS_MAP, n as DAYS, o as SORTED_TIME_FORMATS, r as MONTHS } from "./constants-GZL_CT1W.mjs";
19
19
  import { d as isNumericString } from "./specials-krf7zsqI.mjs";
20
20
  import { r as getOrdinal } from "./utilities-CmPwOkdy.mjs";
21
- import { i as isTimeWithUnit } from "./guards-DBunDnng.mjs";
21
+ import { i as isTimeWithUnit } from "./guards-CyOZsZ1r.mjs";
22
22
 
23
23
  //#region src/date/helpers.ts
24
24
  /** Core formatting logic shared by `formatDate` and `Chronos`, `BanglaCalendar` classes */
@@ -113,7 +113,7 @@ function _padZero(value, length = 2) {
113
113
  return String(value).padStart(length, "0");
114
114
  }
115
115
  /**
116
- * Convert a string, number, or `Date` object to a `Date` object.
116
+ * Convert a string, number, or `Date` object to a new `Date` object.
117
117
  * - If the input is already a `Date`, it is returned as is.
118
118
  * - If it's a string, it is parsed into a `Date`.
119
119
  * - If it's a number, it is treated as a timestamp and converted to a `Date`.
@@ -121,7 +121,7 @@ function _padZero(value, length = 2) {
121
121
  * @returns A `Date` object representing the input date.
122
122
  */
123
123
  function _dateArgsToDate(value) {
124
- return value instanceof Date ? value : new Date(isString(value) ? value.replace(/['"]/g, "") : value ?? Date.now());
124
+ return new Date(value instanceof Date ? value : isString(value) ? value.replace(/['"]/g, "") : value ?? Date.now());
125
125
  }
126
126
 
127
127
  //#endregion
@@ -18,7 +18,7 @@ const require_primitives = require('./primitives-CBGICrDR.cjs');
18
18
  const require_constants = require('./constants-CgFaV72Z.cjs');
19
19
  const require_specials = require('./specials-DU8u108m.cjs');
20
20
  const require_utilities = require('./utilities-_COSGq1U.cjs');
21
- const require_guards = require('./guards-BD2Fkugj.cjs');
21
+ const require_guards = require('./guards-DalSfIxV.cjs');
22
22
 
23
23
  //#region src/date/helpers.ts
24
24
  /** Core formatting logic shared by `formatDate` and `Chronos`, `BanglaCalendar` classes */
@@ -113,7 +113,7 @@ function _padZero(value, length = 2) {
113
113
  return String(value).padStart(length, "0");
114
114
  }
115
115
  /**
116
- * Convert a string, number, or `Date` object to a `Date` object.
116
+ * Convert a string, number, or `Date` object to a new `Date` object.
117
117
  * - If the input is already a `Date`, it is returned as is.
118
118
  * - If it's a string, it is parsed into a `Date`.
119
119
  * - If it's a number, it is treated as a timestamp and converted to a `Date`.
@@ -121,7 +121,7 @@ function _padZero(value, length = 2) {
121
121
  * @returns A `Date` object representing the input date.
122
122
  */
123
123
  function _dateArgsToDate(value) {
124
- return value instanceof Date ? value : new Date(require_primitives.isString(value) ? value.replace(/['"]/g, "") : value ?? Date.now());
124
+ return new Date(value instanceof Date ? value : require_primitives.isString(value) ? value.replace(/['"]/g, "") : value ?? Date.now());
125
125
  }
126
126
 
127
127
  //#endregion
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  const require_primitives = require('./primitives-CBGICrDR.cjs');
18
- const require_utils = require('./utils-C4yOIzOJ.cjs');
19
18
  const require_specials = require('./specials-DU8u108m.cjs');
20
- const require_guards = require('./guards-BD2Fkugj.cjs');
19
+ const require_utils = require('./utils-BzeK3wO9.cjs');
20
+ const require_guards = require('./guards-DalSfIxV.cjs');
21
21
 
22
22
  //#region src/form/guards.ts
23
23
  /**
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  import { d as isString } from "./primitives-Djsevc69.mjs";
18
- import { $ as trimString, a as deepParsePrimitives, f as isDeepEqual } from "./utils-C0NzTJMR.mjs";
19
18
  import { E as isObjectWithKeys, T as isObject, g as isArrayOfType, j as isValidArray, v as isEmptyObject, w as isNotEmptyObject } from "./specials-krf7zsqI.mjs";
20
- import { t as isDateLike } from "./guards-DBunDnng.mjs";
19
+ import { $ as trimString, a as deepParsePrimitives, f as isDeepEqual } from "./utils-DnyVgO8p.mjs";
20
+ import { t as isDateLike } from "./guards-CyOZsZ1r.mjs";
21
21
 
22
22
  //#region src/form/guards.ts
23
23
  /**
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { M as ParsedQueryGeneric, N as QueryObject, j as ParsedQuery } from "./object-DyVg8BFt.cjs";
18
- import { R as QueryString } from "./string-Ok_IMpHP.cjs";
18
+ import { R as QueryString } from "./string-Cm9AMOl_.cjs";
19
19
 
20
20
  //#region src/dom/query.d.ts
21
21
  /**
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { M as ParsedQueryGeneric, N as QueryObject, j as ParsedQuery } from "./object-DyVg8BFt.mjs";
18
- import { R as QueryString } from "./string-edtZyJHf.mjs";
18
+ import { R as QueryString } from "./string-D7N_U6y2.mjs";
19
19
 
20
20
  //#region src/dom/query.d.ts
21
21
  /**
@@ -109,6 +109,17 @@ interface MaskOptions {
109
109
  end?: number;
110
110
  /** Character to use for masking. Defaults to `*`. */
111
111
  maskCharacter?: string;
112
+ /** Whether to trim all whitespace characters before masking. Defaults to `false`. */
113
+ trim?: boolean;
114
+ }
115
+ /** Options for truncating a string */
116
+ interface TruncateOptions {
117
+ /** The maximum length of the truncated string. Defaults to `100`. */
118
+ maxLength?: number;
119
+ /** The string to append to the truncated string. Defaults to `'...'`. */
120
+ suffix?: string;
121
+ /** Whether to trim all whitespace characters from the string before truncating. Defaults to `false`. */
122
+ trim?: boolean;
112
123
  }
113
124
  /** Formatted query string as `?${string}` = `?key=value&...` or empty string. */
114
125
  type QueryString = `?${string}` | '';
@@ -282,4 +293,4 @@ interface CharDiffResult {
282
293
  modified: HighlightedText[];
283
294
  }
284
295
  //#endregion
285
- export { HighlightedText as A, RemovedDiffLine as B, CountryShortISO as C, DiffResult as D, DiffLineType as E, PascalCase as F, TitleCase as G, SnakeCase as H, PascalSnakeCase as I, UnchangedOrModifiedDiffLine as J, TrainCase as K, PathCase as L, IsAlphabet as M, KebabCase as N, DiffStats as O, MaskOptions as P, QueryString as R, CountryName as S, DiffLineDetails as T, SpecialCharacter as U, SentenceCase as V, StringCaseOptions as W, CharDiffResult as _, $NormalizeString as a, CountryCode as b, $TrimRight as c, AddedDiffLine as d, Alphabet as f, CaseFormat as g, CapitalizeOptions as h, $LowercaseWords as i, Includes as j, DotCase as k, $UppercaseWords as l, CamelCase as m, $EnsureString as n, $TitleCaseWords as o, AnagramOptions as p, Trim as q, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, ConstantCase as v, DiffLine as w, CountryISO as x, Country as y, RandomIdOptions as z };
296
+ export { HighlightedText as A, RemovedDiffLine as B, CountryShortISO as C, DiffResult as D, DiffLineType as E, PascalCase as F, TitleCase as G, SnakeCase as H, PascalSnakeCase as I, TruncateOptions as J, TrainCase as K, PathCase as L, IsAlphabet as M, KebabCase as N, DiffStats as O, MaskOptions as P, QueryString as R, CountryName as S, DiffLineDetails as T, SpecialCharacter as U, SentenceCase as V, StringCaseOptions as W, UnchangedOrModifiedDiffLine as Y, CharDiffResult as _, $NormalizeString as a, CountryCode as b, $TrimRight as c, AddedDiffLine as d, Alphabet as f, CaseFormat as g, CapitalizeOptions as h, $LowercaseWords as i, Includes as j, DotCase as k, $UppercaseWords as l, CamelCase as m, $EnsureString as n, $TitleCaseWords as o, AnagramOptions as p, Trim as q, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, ConstantCase as v, DiffLine as w, CountryISO as x, Country as y, RandomIdOptions as z };
@@ -109,6 +109,17 @@ interface MaskOptions {
109
109
  end?: number;
110
110
  /** Character to use for masking. Defaults to `*`. */
111
111
  maskCharacter?: string;
112
+ /** Whether to trim all whitespace characters before masking. Defaults to `false`. */
113
+ trim?: boolean;
114
+ }
115
+ /** Options for truncating a string */
116
+ interface TruncateOptions {
117
+ /** The maximum length of the truncated string. Defaults to `100`. */
118
+ maxLength?: number;
119
+ /** The string to append to the truncated string. Defaults to `'...'`. */
120
+ suffix?: string;
121
+ /** Whether to trim all whitespace characters from the string before truncating. Defaults to `false`. */
122
+ trim?: boolean;
112
123
  }
113
124
  /** Formatted query string as `?${string}` = `?key=value&...` or empty string. */
114
125
  type QueryString = `?${string}` | '';
@@ -282,4 +293,4 @@ interface CharDiffResult {
282
293
  modified: HighlightedText[];
283
294
  }
284
295
  //#endregion
285
- export { HighlightedText as A, RemovedDiffLine as B, CountryShortISO as C, DiffResult as D, DiffLineType as E, PascalCase as F, TitleCase as G, SnakeCase as H, PascalSnakeCase as I, UnchangedOrModifiedDiffLine as J, TrainCase as K, PathCase as L, IsAlphabet as M, KebabCase as N, DiffStats as O, MaskOptions as P, QueryString as R, CountryName as S, DiffLineDetails as T, SpecialCharacter as U, SentenceCase as V, StringCaseOptions as W, CharDiffResult as _, $NormalizeString as a, CountryCode as b, $TrimRight as c, AddedDiffLine as d, Alphabet as f, CaseFormat as g, CapitalizeOptions as h, $LowercaseWords as i, Includes as j, DotCase as k, $UppercaseWords as l, CamelCase as m, $EnsureString as n, $TitleCaseWords as o, AnagramOptions as p, Trim as q, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, ConstantCase as v, DiffLine as w, CountryISO as x, Country as y, RandomIdOptions as z };
296
+ export { HighlightedText as A, RemovedDiffLine as B, CountryShortISO as C, DiffResult as D, DiffLineType as E, PascalCase as F, TitleCase as G, SnakeCase as H, PascalSnakeCase as I, TruncateOptions as J, TrainCase as K, PathCase as L, IsAlphabet as M, KebabCase as N, DiffStats as O, MaskOptions as P, QueryString as R, CountryName as S, DiffLineDetails as T, SpecialCharacter as U, SentenceCase as V, StringCaseOptions as W, UnchangedOrModifiedDiffLine as Y, CharDiffResult as _, $NormalizeString as a, CountryCode as b, $TrimRight as c, AddedDiffLine as d, Alphabet as f, CaseFormat as g, CapitalizeOptions as h, $LowercaseWords as i, Includes as j, DotCase as k, $UppercaseWords as l, CamelCase as m, $EnsureString as n, $TitleCaseWords as o, AnagramOptions as p, Trim as q, $LowerCaseWord as r, $TrimLeft as s, $CapitalizeWords as t, $WidenEmpty as u, ConstantCase as v, DiffLine as w, CountryISO as x, Country as y, RandomIdOptions as z };
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-DhsFvo_D.cjs";
17
+ import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-cW0-Ichd.cjs";
18
18
  export { CustomFile, FileError, FileUpload, FormDataConfigs, OriginFileObj, ParsedFormData, SerializedForm };
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-D_5I437n.mjs";
17
+ import { a as OriginFileObj, i as FormDataConfigs, n as FileError, o as ParsedFormData, r as FileUpload, s as SerializedForm, t as CustomFile } from "../form-CDTwFDkB.mjs";
18
18
  export { CustomFile, FileError, FileUpload, FormDataConfigs, OriginFileObj, ParsedFormData, SerializedForm };
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { A as HighlightedText, B as RemovedDiffLine, C as CountryShortISO, D as DiffResult, E as DiffLineType, F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, J as UnchangedOrModifiedDiffLine, K as TrainCase, L as PathCase, M as IsAlphabet, N as KebabCase, O as DiffStats, P as MaskOptions, R as QueryString, S as CountryName, T as DiffLineDetails, U as SpecialCharacter, V as SentenceCase, W as StringCaseOptions, _ as CharDiffResult, a as $NormalizeString, b as CountryCode, c as $TrimRight, d as AddedDiffLine, f as Alphabet, g as CaseFormat, h as CapitalizeOptions, i as $LowercaseWords, j as Includes, k as DotCase, l as $UppercaseWords, m as CamelCase, n as $EnsureString, o as $TitleCaseWords, p as AnagramOptions, q as Trim, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as $WidenEmpty, v as ConstantCase, w as DiffLine, x as CountryISO, y as Country, z as RandomIdOptions } from "../string-Ok_IMpHP.cjs";
18
- export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, AddedDiffLine, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineDetails, DiffLineType, DiffResult, DiffStats, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, RemovedDiffLine, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim, UnchangedOrModifiedDiffLine };
17
+ import { A as HighlightedText, B as RemovedDiffLine, C as CountryShortISO, D as DiffResult, E as DiffLineType, F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, J as TruncateOptions, K as TrainCase, L as PathCase, M as IsAlphabet, N as KebabCase, O as DiffStats, P as MaskOptions, R as QueryString, S as CountryName, T as DiffLineDetails, U as SpecialCharacter, V as SentenceCase, W as StringCaseOptions, Y as UnchangedOrModifiedDiffLine, _ as CharDiffResult, a as $NormalizeString, b as CountryCode, c as $TrimRight, d as AddedDiffLine, f as Alphabet, g as CaseFormat, h as CapitalizeOptions, i as $LowercaseWords, j as Includes, k as DotCase, l as $UppercaseWords, m as CamelCase, n as $EnsureString, o as $TitleCaseWords, p as AnagramOptions, q as Trim, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as $WidenEmpty, v as ConstantCase, w as DiffLine, x as CountryISO, y as Country, z as RandomIdOptions } from "../string-Cm9AMOl_.cjs";
18
+ export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, AddedDiffLine, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineDetails, DiffLineType, DiffResult, DiffStats, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, RemovedDiffLine, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim, TruncateOptions, UnchangedOrModifiedDiffLine };
@@ -14,5 +14,5 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { A as HighlightedText, B as RemovedDiffLine, C as CountryShortISO, D as DiffResult, E as DiffLineType, F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, J as UnchangedOrModifiedDiffLine, K as TrainCase, L as PathCase, M as IsAlphabet, N as KebabCase, O as DiffStats, P as MaskOptions, R as QueryString, S as CountryName, T as DiffLineDetails, U as SpecialCharacter, V as SentenceCase, W as StringCaseOptions, _ as CharDiffResult, a as $NormalizeString, b as CountryCode, c as $TrimRight, d as AddedDiffLine, f as Alphabet, g as CaseFormat, h as CapitalizeOptions, i as $LowercaseWords, j as Includes, k as DotCase, l as $UppercaseWords, m as CamelCase, n as $EnsureString, o as $TitleCaseWords, p as AnagramOptions, q as Trim, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as $WidenEmpty, v as ConstantCase, w as DiffLine, x as CountryISO, y as Country, z as RandomIdOptions } from "../string-edtZyJHf.mjs";
18
- export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, AddedDiffLine, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineDetails, DiffLineType, DiffResult, DiffStats, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, RemovedDiffLine, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim, UnchangedOrModifiedDiffLine };
17
+ import { A as HighlightedText, B as RemovedDiffLine, C as CountryShortISO, D as DiffResult, E as DiffLineType, F as PascalCase, G as TitleCase, H as SnakeCase, I as PascalSnakeCase, J as TruncateOptions, K as TrainCase, L as PathCase, M as IsAlphabet, N as KebabCase, O as DiffStats, P as MaskOptions, R as QueryString, S as CountryName, T as DiffLineDetails, U as SpecialCharacter, V as SentenceCase, W as StringCaseOptions, Y as UnchangedOrModifiedDiffLine, _ as CharDiffResult, a as $NormalizeString, b as CountryCode, c as $TrimRight, d as AddedDiffLine, f as Alphabet, g as CaseFormat, h as CapitalizeOptions, i as $LowercaseWords, j as Includes, k as DotCase, l as $UppercaseWords, m as CamelCase, n as $EnsureString, o as $TitleCaseWords, p as AnagramOptions, q as Trim, r as $LowerCaseWord, s as $TrimLeft, t as $CapitalizeWords, u as $WidenEmpty, v as ConstantCase, w as DiffLine, x as CountryISO, y as Country, z as RandomIdOptions } from "../string-D7N_U6y2.mjs";
18
+ export { $CapitalizeWords, $EnsureString, $LowerCaseWord, $LowercaseWords, $NormalizeString, $TitleCaseWords, $TrimLeft, $TrimRight, $UppercaseWords, $WidenEmpty, AddedDiffLine, Alphabet, AnagramOptions, CamelCase, CapitalizeOptions, CaseFormat, CharDiffResult, ConstantCase, Country, CountryCode, CountryISO, CountryName, CountryShortISO, DiffLine, DiffLineDetails, DiffLineType, DiffResult, DiffStats, DotCase, HighlightedText, Includes, IsAlphabet, KebabCase, MaskOptions, PascalCase, PascalSnakeCase, PathCase, QueryString, RandomIdOptions, RemovedDiffLine, SentenceCase, SnakeCase, SpecialCharacter, StringCaseOptions, TitleCase, TrainCase, Trim, TruncateOptions, UnchangedOrModifiedDiffLine };
@@ -17,22 +17,28 @@
17
17
  const require_primitives = require('./primitives-CBGICrDR.cjs');
18
18
  const require_specials = require('./specials-DU8u108m.cjs');
19
19
  const require_utilities = require('./utilities-_COSGq1U.cjs');
20
- const require_guards = require('./guards-BD2Fkugj.cjs');
20
+ const require_guards = require('./guards-DalSfIxV.cjs');
21
21
 
22
22
  //#region src/string/basics.ts
23
- /**
24
- * * Utility to truncate a string to a specified length.
23
+ /** Utility to truncate a string to a specified length.
25
24
  *
26
25
  * @param str The string to truncate.
27
- * @param maxLength The maximum length of the truncated string.
28
- * @returns Truncated string with ellipsis (`...`) (only if it has more length than `maxLength`).
26
+ * @param optionsOrLength The maximum length of the truncated string or options.
27
+ * @returns Truncated string based on provided options.
29
28
  */
30
- function truncateString(str, maxLength) {
29
+ function truncateString(str, optionsOrLength) {
31
30
  if (!require_primitives.isNonEmptyString(str)) return "";
32
- const trimmedString = str.trim();
31
+ let maxLength = 100, suffix = "...", trim = false;
32
+ if (require_primitives.isNumber(optionsOrLength) && optionsOrLength > 0) maxLength = optionsOrLength;
33
+ else if (require_specials.isNotEmptyObject(optionsOrLength)) {
34
+ maxLength = optionsOrLength?.maxLength ?? maxLength;
35
+ suffix = optionsOrLength?.suffix ?? suffix;
36
+ trim = optionsOrLength?.trim ?? trim;
37
+ }
38
+ const trimmedString = trim ? trimString(str) : str;
33
39
  if (!trimmedString) return "";
34
40
  if (trimmedString.length <= maxLength) return trimmedString;
35
- return trimmedString.slice(0, maxLength).concat("...");
41
+ return trimmedString.slice(0, maxLength).concat(suffix);
36
42
  }
37
43
  /**
38
44
  * * Generates a random alphanumeric (16 characters long, this length is customizable in the options) ID string composed of an optional `prefix`, `suffix`, a `timestamp`, `caseOption` and a customizable `separator`.
@@ -41,6 +47,7 @@ function truncateString(str, maxLength) {
41
47
  * @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
42
48
  *
43
49
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/uuid uuid} for `uuid` generation
50
+ * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-numeric randomHex} for random numeric string generation
44
51
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-hex randomHex} for random hexadecimal string generation
45
52
  *
46
53
  * @example
@@ -145,7 +152,7 @@ function trimString(input) {
145
152
  * - If `size` is 0 or negative, an empty `Uint8Array` is returned.
146
153
  */
147
154
  function randomBytes(size = 8) {
148
- if (size <= 0) return new Uint8Array(0);
155
+ if (size <= 0) return /* @__PURE__ */ new Uint8Array(0);
149
156
  return _fillWithRandomValues(new Uint8Array(size));
150
157
  }
151
158
  /**
@@ -578,7 +585,7 @@ function sha256Bytes(message) {
578
585
  const lenView = new DataView(padding.buffer);
579
586
  lenView.setUint32(padding.length - 8, Math.floor(ml / 4294967296), false);
580
587
  lenView.setUint32(padding.length - 4, ml & 4294967295, false);
581
- const w = new Uint32Array(64);
588
+ const w = /* @__PURE__ */ new Uint32Array(64);
582
589
  const chunkView = new DataView(padding.buffer);
583
590
  for (let offset = 0; offset < padding.length; offset += 64) {
584
591
  for (let t = 0; t < 16; t++) w[t] = chunkView.getUint32(offset + t * 4, false);
@@ -618,7 +625,7 @@ function sha256Bytes(message) {
618
625
  H[6] = H[6] + g >>> 0;
619
626
  H[7] = H[7] + h >>> 0;
620
627
  }
621
- const out = new Uint8Array(32);
628
+ const out = /* @__PURE__ */ new Uint8Array(32);
622
629
  const outView = new DataView(out.buffer);
623
630
  for (let i = 0; i < 8; i++) outView.setUint32(i * 4, H[i], false);
624
631
  return out;
@@ -757,7 +764,7 @@ function uint8To32ArrayBE(bytes) {
757
764
  * @see {@link uint8To32ArrayBE} for bytes to 32-bit integers conversion
758
765
  */
759
766
  function intTo4BytesBE(n) {
760
- const b = new Uint8Array(4);
767
+ const b = /* @__PURE__ */ new Uint8Array(4);
761
768
  b[0] = n >>> 24 & 255;
762
769
  b[1] = n >>> 16 & 255;
763
770
  b[2] = n >>> 8 & 255;
@@ -847,7 +854,7 @@ function bytesToHex(bytes) {
847
854
  * @see {@link bytesToHex} for the reverse process
848
855
  */
849
856
  function hexToBytes(hex) {
850
- if (!require_specials.isHexString(hex)) return new Uint8Array();
857
+ if (!require_specials.isHexString(hex)) return /* @__PURE__ */ new Uint8Array();
851
858
  const bytes = _splitByCharLength(hex, 2).map((h) => parseInt(h, 16));
852
859
  return new Uint8Array(bytes);
853
860
  }
@@ -1163,7 +1170,7 @@ function sha1(msg) {
1163
1170
  271733878,
1164
1171
  3285377520
1165
1172
  ];
1166
- const W = new Uint32Array(80);
1173
+ const W = /* @__PURE__ */ new Uint32Array(80);
1167
1174
  for (let i = 0; i < words.length; i += 16) {
1168
1175
  for (let j = 0; j < 16; j++) W[j] = words[i + j] | 0;
1169
1176
  for (let j = 16; j < 80; j++) W[j] = rotl(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1);
@@ -1292,7 +1299,7 @@ function uuid(options) {
1292
1299
  case "v3":
1293
1300
  if (_isOptionV3V5(options)) return _formatUUID(md5(options.namespace + options.name), 3, uppercase);
1294
1301
  throw new Error("v3 requires valid namespace (uuid) and name!");
1295
- case "v4": return _formatUUID(_bytesToRandomHex(new Uint8Array(16)), 4, uppercase);
1302
+ case "v4": return _formatUUID(_bytesToRandomHex(/* @__PURE__ */ new Uint8Array(16)), 4, uppercase);
1296
1303
  case "v5":
1297
1304
  if (_isOptionV3V5(options)) return _formatUUID(sha1(options.namespace + options.name).slice(0, 32), 5, uppercase);
1298
1305
  throw new Error("v5 requires valid namespace (uuid) and name!");
@@ -1306,7 +1313,7 @@ function uuid(options) {
1306
1313
  case "v7": return _formatUUID(Date.now().toString(16).padStart(12, "0") + randomHex(20), 7, uppercase);
1307
1314
  case "v8": {
1308
1315
  const ts = BigInt(Date.now());
1309
- const bytes = new Uint8Array(16);
1316
+ const bytes = /* @__PURE__ */ new Uint8Array(16);
1310
1317
  let temp = ts;
1311
1318
  for (let i = 5; i >= 0; i--) {
1312
1319
  bytes[i] = Number(temp & 255n);
@@ -1671,7 +1678,8 @@ function getInstanceGetterNames(cls) {
1671
1678
  * @returns A sorted array of static getter names.
1672
1679
  */
1673
1680
  function getStaticGetterNames(cls) {
1674
- return sortAnArray(Object.entries(Object.getOwnPropertyDescriptors(cls)).filter(([key, desc]) => typeof desc.get === "function" && key !== "prototype").map(([key]) => key));
1681
+ const descriptors = Object.getOwnPropertyDescriptors(cls);
1682
+ return sortAnArray(Object.entries(descriptors).filter(([key, desc]) => typeof desc.get === "function" && key !== "prototype").map(([key]) => key));
1675
1683
  }
1676
1684
  /**
1677
1685
  * * Gathers detailed information about the instance and static methods of a class.
@@ -17,22 +17,28 @@
17
17
  import { a as isNonEmptyString, c as isNumber, d as isString, m as isUndefined, n as isBoolean, u as isPrimitive } from "./primitives-Djsevc69.mjs";
18
18
  import { C as isMethodDescriptor, E as isObjectWithKeys, T as isObject, b as isFunction, c as isHexString, d as isNumericString, g as isArrayOfType, h as isArray, j as isValidArray, m as isUUID, w as isNotEmptyObject } from "./specials-krf7zsqI.mjs";
19
19
  import { a as normalizeNumber } from "./utilities-CmPwOkdy.mjs";
20
- import { t as isDateLike } from "./guards-DBunDnng.mjs";
20
+ import { t as isDateLike } from "./guards-CyOZsZ1r.mjs";
21
21
 
22
22
  //#region src/string/basics.ts
23
- /**
24
- * * Utility to truncate a string to a specified length.
23
+ /** Utility to truncate a string to a specified length.
25
24
  *
26
25
  * @param str The string to truncate.
27
- * @param maxLength The maximum length of the truncated string.
28
- * @returns Truncated string with ellipsis (`...`) (only if it has more length than `maxLength`).
26
+ * @param optionsOrLength The maximum length of the truncated string or options.
27
+ * @returns Truncated string based on provided options.
29
28
  */
30
- function truncateString(str, maxLength) {
29
+ function truncateString(str, optionsOrLength) {
31
30
  if (!isNonEmptyString(str)) return "";
32
- const trimmedString = str.trim();
31
+ let maxLength = 100, suffix = "...", trim = false;
32
+ if (isNumber(optionsOrLength) && optionsOrLength > 0) maxLength = optionsOrLength;
33
+ else if (isNotEmptyObject(optionsOrLength)) {
34
+ maxLength = optionsOrLength?.maxLength ?? maxLength;
35
+ suffix = optionsOrLength?.suffix ?? suffix;
36
+ trim = optionsOrLength?.trim ?? trim;
37
+ }
38
+ const trimmedString = trim ? trimString(str) : str;
33
39
  if (!trimmedString) return "";
34
40
  if (trimmedString.length <= maxLength) return trimmedString;
35
- return trimmedString.slice(0, maxLength).concat("...");
41
+ return trimmedString.slice(0, maxLength).concat(suffix);
36
42
  }
37
43
  /**
38
44
  * * Generates a random alphanumeric (16 characters long, this length is customizable in the options) ID string composed of an optional `prefix`, `suffix`, a `timestamp`, `caseOption` and a customizable `separator`.
@@ -41,6 +47,7 @@ function truncateString(str, maxLength) {
41
47
  * @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
42
48
  *
43
49
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/uuid uuid} for `uuid` generation
50
+ * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-numeric randomHex} for random numeric string generation
44
51
  * @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utils/hash/random-hex randomHex} for random hexadecimal string generation
45
52
  *
46
53
  * @example
@@ -145,7 +152,7 @@ function trimString(input) {
145
152
  * - If `size` is 0 or negative, an empty `Uint8Array` is returned.
146
153
  */
147
154
  function randomBytes(size = 8) {
148
- if (size <= 0) return new Uint8Array(0);
155
+ if (size <= 0) return /* @__PURE__ */ new Uint8Array(0);
149
156
  return _fillWithRandomValues(new Uint8Array(size));
150
157
  }
151
158
  /**
@@ -578,7 +585,7 @@ function sha256Bytes(message) {
578
585
  const lenView = new DataView(padding.buffer);
579
586
  lenView.setUint32(padding.length - 8, Math.floor(ml / 4294967296), false);
580
587
  lenView.setUint32(padding.length - 4, ml & 4294967295, false);
581
- const w = new Uint32Array(64);
588
+ const w = /* @__PURE__ */ new Uint32Array(64);
582
589
  const chunkView = new DataView(padding.buffer);
583
590
  for (let offset = 0; offset < padding.length; offset += 64) {
584
591
  for (let t = 0; t < 16; t++) w[t] = chunkView.getUint32(offset + t * 4, false);
@@ -618,7 +625,7 @@ function sha256Bytes(message) {
618
625
  H[6] = H[6] + g >>> 0;
619
626
  H[7] = H[7] + h >>> 0;
620
627
  }
621
- const out = new Uint8Array(32);
628
+ const out = /* @__PURE__ */ new Uint8Array(32);
622
629
  const outView = new DataView(out.buffer);
623
630
  for (let i = 0; i < 8; i++) outView.setUint32(i * 4, H[i], false);
624
631
  return out;
@@ -757,7 +764,7 @@ function uint8To32ArrayBE(bytes) {
757
764
  * @see {@link uint8To32ArrayBE} for bytes to 32-bit integers conversion
758
765
  */
759
766
  function intTo4BytesBE(n) {
760
- const b = new Uint8Array(4);
767
+ const b = /* @__PURE__ */ new Uint8Array(4);
761
768
  b[0] = n >>> 24 & 255;
762
769
  b[1] = n >>> 16 & 255;
763
770
  b[2] = n >>> 8 & 255;
@@ -847,7 +854,7 @@ function bytesToHex(bytes) {
847
854
  * @see {@link bytesToHex} for the reverse process
848
855
  */
849
856
  function hexToBytes(hex) {
850
- if (!isHexString(hex)) return new Uint8Array();
857
+ if (!isHexString(hex)) return /* @__PURE__ */ new Uint8Array();
851
858
  const bytes = _splitByCharLength(hex, 2).map((h) => parseInt(h, 16));
852
859
  return new Uint8Array(bytes);
853
860
  }
@@ -1163,7 +1170,7 @@ function sha1(msg) {
1163
1170
  271733878,
1164
1171
  3285377520
1165
1172
  ];
1166
- const W = new Uint32Array(80);
1173
+ const W = /* @__PURE__ */ new Uint32Array(80);
1167
1174
  for (let i = 0; i < words.length; i += 16) {
1168
1175
  for (let j = 0; j < 16; j++) W[j] = words[i + j] | 0;
1169
1176
  for (let j = 16; j < 80; j++) W[j] = rotl(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1);
@@ -1292,7 +1299,7 @@ function uuid(options) {
1292
1299
  case "v3":
1293
1300
  if (_isOptionV3V5(options)) return _formatUUID(md5(options.namespace + options.name), 3, uppercase);
1294
1301
  throw new Error("v3 requires valid namespace (uuid) and name!");
1295
- case "v4": return _formatUUID(_bytesToRandomHex(new Uint8Array(16)), 4, uppercase);
1302
+ case "v4": return _formatUUID(_bytesToRandomHex(/* @__PURE__ */ new Uint8Array(16)), 4, uppercase);
1296
1303
  case "v5":
1297
1304
  if (_isOptionV3V5(options)) return _formatUUID(sha1(options.namespace + options.name).slice(0, 32), 5, uppercase);
1298
1305
  throw new Error("v5 requires valid namespace (uuid) and name!");
@@ -1306,7 +1313,7 @@ function uuid(options) {
1306
1313
  case "v7": return _formatUUID(Date.now().toString(16).padStart(12, "0") + randomHex(20), 7, uppercase);
1307
1314
  case "v8": {
1308
1315
  const ts = BigInt(Date.now());
1309
- const bytes = new Uint8Array(16);
1316
+ const bytes = /* @__PURE__ */ new Uint8Array(16);
1310
1317
  let temp = ts;
1311
1318
  for (let i = 5; i >= 0; i--) {
1312
1319
  bytes[i] = Number(temp & 255n);
@@ -1671,7 +1678,8 @@ function getInstanceGetterNames(cls) {
1671
1678
  * @returns A sorted array of static getter names.
1672
1679
  */
1673
1680
  function getStaticGetterNames(cls) {
1674
- return sortAnArray(Object.entries(Object.getOwnPropertyDescriptors(cls)).filter(([key, desc]) => typeof desc.get === "function" && key !== "prototype").map(([key]) => key));
1681
+ const descriptors = Object.getOwnPropertyDescriptors(cls);
1682
+ return sortAnArray(Object.entries(descriptors).filter(([key, desc]) => typeof desc.get === "function" && key !== "prototype").map(([key]) => key));
1675
1683
  }
1676
1684
  /**
1677
1685
  * * Gathers detailed information about the instance and static methods of a class.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolbox-x",
3
- "version": "2.4.2",
3
+ "version": "2.4.6",
4
4
  "description": "A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.",
5
5
  "main": "./dist/index.cjs",
6
6
  "type": "module",
@@ -11,6 +11,8 @@
11
11
  "utility",
12
12
  "functions",
13
13
  "class",
14
+ "guard",
15
+ "predicate",
14
16
  "form",
15
17
  "random-id",
16
18
  "id",
@@ -37,6 +39,7 @@
37
39
  "verbalize",
38
40
  "verbalizer",
39
41
  "date",
42
+ "date-time",
40
43
  "chalk",
41
44
  "console",
42
45
  "style",
@@ -96,12 +99,12 @@
96
99
  },
97
100
  "license": "Apache-2.0",
98
101
  "devDependencies": {
99
- "@biomejs/biome": "^2.5.0",
100
- "@types/node": "^25.9.3",
102
+ "@biomejs/biome": "^2.5.1",
103
+ "@types/node": "^26.0.1",
101
104
  "husky": "^9.1.7",
102
- "lint-staged": "^17.0.7",
105
+ "lint-staged": "^17.0.8",
103
106
  "nhb-scripts": "^1.9.2",
104
- "tsdown": "^0.22.2",
107
+ "tsdown": "^0.22.3",
105
108
  "typescript": "^6.0.3"
106
109
  },
107
110
  "lint-staged": {