@arkyn/shared 3.0.1-beta.155 → 3.0.1-beta.156

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 (55) hide show
  1. package/dist/index.js +371 -30
  2. package/dist/modules/formats/formatDate.js +42 -0
  3. package/dist/modules/formats/formatJsonObject.js +32 -0
  4. package/dist/modules/formats/formatJsonString.js +13 -0
  5. package/dist/modules/formats/formatToCapitalizeFirstWordLetter.js +9 -0
  6. package/dist/modules/formats/formatToCep.js +9 -0
  7. package/dist/modules/formats/formatToCnpj.js +9 -0
  8. package/dist/modules/formats/formatToCpf.js +9 -0
  9. package/dist/modules/formats/formatToCurrency.js +15 -0
  10. package/dist/modules/formats/formatToEllipsis.js +11 -0
  11. package/dist/modules/formats/formatToHiddenDigits.js +12 -0
  12. package/dist/modules/formats/formatToPhone.js +17 -0
  13. package/dist/modules/generators/generateColorByString.js +9 -0
  14. package/dist/modules/generators/generateId.js +26 -0
  15. package/dist/modules/generators/generateSlug.js +7 -0
  16. package/dist/modules/index.js +52 -0
  17. package/dist/modules/parsers/parseLargeFields.js +22 -0
  18. package/dist/modules/parsers/parseSensitiveData.js +26 -0
  19. package/dist/modules/parsers/parseToDate.js +27 -0
  20. package/dist/modules/services/validateDateService.js +59 -0
  21. package/dist/modules/utilities/calculateCardInstallment.js +21 -0
  22. package/dist/modules/utilities/ensureQuotes.js +7 -0
  23. package/dist/modules/utilities/findCountryMask.js +25 -0
  24. package/dist/modules/utilities/isHtml.js +6 -0
  25. package/dist/modules/utilities/removeCurrencySymbols.js +6 -0
  26. package/dist/modules/utilities/removeNonNumeric.js +6 -0
  27. package/dist/modules/utilities/stripHtmlTags.js +6 -0
  28. package/package.json +100 -74
  29. package/dist/bundle.js +0 -3719
  30. package/dist/bundle.umd.cjs +0 -10
  31. package/dist/formats/formatDate.js +0 -65
  32. package/dist/formats/formatJsonObject.js +0 -89
  33. package/dist/formats/formatJsonString.js +0 -30
  34. package/dist/formats/formatToCapitalizeFirstWordLetter.js +0 -23
  35. package/dist/formats/formatToCep.js +0 -28
  36. package/dist/formats/formatToCnpj.js +0 -26
  37. package/dist/formats/formatToCpf.js +0 -28
  38. package/dist/formats/formatToCurrency.js +0 -31
  39. package/dist/formats/formatToEllipsis.js +0 -32
  40. package/dist/formats/formatToHiddenDigits.js +0 -49
  41. package/dist/formats/formatToPhone.js +0 -43
  42. package/dist/generators/generateColorByString.js +0 -28
  43. package/dist/generators/generateId.js +0 -29
  44. package/dist/generators/generateSlug.js +0 -31
  45. package/dist/parsers/parseLargeFields.js +0 -55
  46. package/dist/parsers/parseSensitiveData.js +0 -57
  47. package/dist/parsers/parseToDate.js +0 -51
  48. package/dist/services/validateDateService.js +0 -81
  49. package/dist/utilities/calculateCardInstallment.js +0 -39
  50. package/dist/utilities/ensureQuotes.js +0 -26
  51. package/dist/utilities/findCountryMask.js +0 -49
  52. package/dist/utilities/isHtml.js +0 -23
  53. package/dist/utilities/removeCurrencySymbols.js +0 -23
  54. package/dist/utilities/removeNonNumeric.js +0 -16
  55. package/dist/utilities/stripHtmlTags.js +0 -23
@@ -0,0 +1,52 @@
1
+ import { formatDate as e } from "./formats/formatDate.js";
2
+ import { formatJsonObject as m } from "./formats/formatJsonObject.js";
3
+ import { formatJsonString as p } from "./formats/formatJsonString.js";
4
+ import { formatToCapitalizeFirstWordLetter as x } from "./formats/formatToCapitalizeFirstWordLetter.js";
5
+ import { formatToCep as n } from "./formats/formatToCep.js";
6
+ import { formatToCnpj as l } from "./formats/formatToCnpj.js";
7
+ import { formatToCpf as g } from "./formats/formatToCpf.js";
8
+ import { formatToCurrency as d } from "./formats/formatToCurrency.js";
9
+ import { formatToEllipsis as c } from "./formats/formatToEllipsis.js";
10
+ import { formatToHiddenDigits as y } from "./formats/formatToHiddenDigits.js";
11
+ import { formatToPhone as v } from "./formats/formatToPhone.js";
12
+ import { generateColorByString as b } from "./generators/generateColorByString.js";
13
+ import { generateId as F } from "./generators/generateId.js";
14
+ import { generateSlug as J } from "./generators/generateSlug.js";
15
+ import { parseLargeFields as N } from "./parsers/parseLargeFields.js";
16
+ import { parseSensitiveData as k } from "./parsers/parseSensitiveData.js";
17
+ import { parseToDate as B } from "./parsers/parseToDate.js";
18
+ import { ValidateDateService as M } from "./services/validateDateService.js";
19
+ import { calculateCardInstallment as P } from "./utilities/calculateCardInstallment.js";
20
+ import { ensureQuotes as V } from "./utilities/ensureQuotes.js";
21
+ import { findCountryMask as q } from "./utilities/findCountryMask.js";
22
+ import { isHtml as A } from "./utilities/isHtml.js";
23
+ import { removeCurrencySymbols as K } from "./utilities/removeCurrencySymbols.js";
24
+ import { removeNonNumeric as U } from "./utilities/removeNonNumeric.js";
25
+ import { stripHtmlTags as Y } from "./utilities/stripHtmlTags.js";
26
+ export {
27
+ M as ValidateDateService,
28
+ P as calculateCardInstallment,
29
+ V as ensureQuotes,
30
+ q as findCountryMask,
31
+ e as formatDate,
32
+ m as formatJsonObject,
33
+ p as formatJsonString,
34
+ x as formatToCapitalizeFirstWordLetter,
35
+ n as formatToCep,
36
+ l as formatToCnpj,
37
+ g as formatToCpf,
38
+ d as formatToCurrency,
39
+ c as formatToEllipsis,
40
+ y as formatToHiddenDigits,
41
+ v as formatToPhone,
42
+ b as generateColorByString,
43
+ F as generateId,
44
+ J as generateSlug,
45
+ A as isHtml,
46
+ N as parseLargeFields,
47
+ k as parseSensitiveData,
48
+ B as parseToDate,
49
+ K as removeCurrencySymbols,
50
+ U as removeNonNumeric,
51
+ Y as stripHtmlTags
52
+ };
@@ -0,0 +1,22 @@
1
+ function c(n, i = 1e3) {
2
+ function s(r) {
3
+ return typeof r == "string" && r.length > i ? `To large information: field as ${r.length} characters` : r;
4
+ }
5
+ function e(r) {
6
+ return Array.isArray(r) ? r.map((t) => e(t)) : r !== null && typeof r == "object" ? Object.fromEntries(
7
+ Object.entries(r).map(([t, a]) => [
8
+ t,
9
+ e(a)
10
+ ])
11
+ ) : s(r);
12
+ }
13
+ try {
14
+ const r = JSON.parse(n), t = e(r);
15
+ return JSON.stringify(t);
16
+ } catch {
17
+ throw new Error("Invalid JSON string");
18
+ }
19
+ }
20
+ export {
21
+ c as parseLargeFields
22
+ };
@@ -0,0 +1,26 @@
1
+ function f(i, c = ["password", "confirmPassword", "creditCard"]) {
2
+ function u(r, e) {
3
+ return c.includes(r) ? "****" : e;
4
+ }
5
+ function t(r) {
6
+ return Array.isArray(r) ? r.map((e) => t(e)) : r !== null && typeof r == "object" ? Object.keys(r).reduce((e, s) => {
7
+ let n = r[s];
8
+ if (typeof n == "string")
9
+ try {
10
+ const a = JSON.parse(n);
11
+ typeof a == "object" && (n = JSON.stringify(t(a)));
12
+ } catch {
13
+ }
14
+ return e[s] = t(u(s, n)), e;
15
+ }, {}) : r;
16
+ }
17
+ try {
18
+ const r = JSON.parse(i), e = t(r);
19
+ return JSON.stringify(e);
20
+ } catch {
21
+ return i;
22
+ }
23
+ }
24
+ export {
25
+ f as parseSensitiveData
26
+ };
@@ -0,0 +1,27 @@
1
+ import { ValidateDateService as u } from "../services/validateDateService.js";
2
+ function b([n, c = "00:00:00"], o, m = 0) {
3
+ const r = new u();
4
+ r.validateInputFormat(o);
5
+ const i = n.split(/[-/]/).map(Number), d = c.split(".")[0].split(":").map(Number);
6
+ let t, e, a;
7
+ const [l = 0, D = 0, p = 0] = d;
8
+ switch (o) {
9
+ case "brazilianDate":
10
+ [t, e, a] = i, r.validateDateParts(a, e, t);
11
+ break;
12
+ case "isoDate":
13
+ [e, t, a] = i, r.validateDateParts(a, e, t);
14
+ break;
15
+ case "timestamp":
16
+ [a, e, t] = i, r.validateDateParts(a, e, t);
17
+ break;
18
+ }
19
+ const s = new Date(
20
+ Date.UTC(a, e - 1, t, l, D, p)
21
+ );
22
+ if (isNaN(s.getTime())) throw new Error("Invalid date");
23
+ return s.setUTCHours(s.getUTCHours() + m), s;
24
+ }
25
+ export {
26
+ b as parseToDate
27
+ };
@@ -0,0 +1,59 @@
1
+ class l {
2
+ isLeapYear(e) {
3
+ return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
4
+ }
5
+ getDaysInMonth(e, r) {
6
+ const a = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
7
+ return e === 2 && this.isLeapYear(r) ? 29 : a[e - 1];
8
+ }
9
+ validateDayInMonth(e, r, a) {
10
+ const t = this.getDaysInMonth(r, a);
11
+ if (e > t) {
12
+ const n = `Day ${e} is not valid for ${[
13
+ "January",
14
+ "February",
15
+ "March",
16
+ "April",
17
+ "May",
18
+ "June",
19
+ "July",
20
+ "August",
21
+ "September",
22
+ "October",
23
+ "November",
24
+ "December"
25
+ ][r - 1]}`, o = `Day ${e} is not valid for February ${a} (non-leap year)`;
26
+ throw r === 2 && e === 29 ? new Error(o) : new Error(n);
27
+ }
28
+ }
29
+ /**
30
+ * Throws if year, month, or day are out of valid range or inconsistent with the calendar.
31
+ *
32
+ * @param year - 4-digit year (1000–9999).
33
+ * @param month - Month number (1–12).
34
+ * @param day - Day number (1–31, validated against the specific month).
35
+ */
36
+ validateDateParts(e, r, a) {
37
+ const t = {
38
+ year: "Year should be four digits",
39
+ month: "Month should be between 1 and 12",
40
+ day: "Day should be between 1 and 31"
41
+ };
42
+ if (`${e}`.length !== 4) throw new Error(t.year);
43
+ if (r < 1 || r > 12) throw new Error(t.month);
44
+ if (a < 1 || a > 31) throw new Error(t.day);
45
+ this.validateDayInMonth(a, r, e);
46
+ }
47
+ /**
48
+ * Throws if `format` is not one of `"brazilianDate"`, `"isoDate"`, or `"timestamp"`.
49
+ *
50
+ * @param format - The format string to check.
51
+ */
52
+ validateInputFormat(e) {
53
+ if (!["brazilianDate", "isoDate", "timestamp"].includes(e))
54
+ throw new Error(`Invalid input format: ${e}`);
55
+ }
56
+ }
57
+ export {
58
+ l as ValidateDateService
59
+ };
@@ -0,0 +1,21 @@
1
+ function s(o) {
2
+ const { cashPrice: r, numberInstallments: t, fees: e = 0.0349 } = o;
3
+ if (e === 0 || t === 1)
4
+ return {
5
+ totalPrice: r,
6
+ installmentPrice: r / t
7
+ };
8
+ if (t <= 0)
9
+ throw new Error("Number of installments must be greater than 0");
10
+ if (e < 0)
11
+ throw new Error("Fees must be greater than or equal to 0");
12
+ let a = Math.pow(1 + e, t) * e, i = Math.pow(1 + e, t) - 1;
13
+ const n = +(r * (a / i)).toFixed(2);
14
+ return {
15
+ totalPrice: +(+(n * t).toFixed(2)).toFixed(2),
16
+ installmentPrice: +n.toFixed(2)
17
+ };
18
+ }
19
+ export {
20
+ s as calculateCardInstallment
21
+ };
@@ -0,0 +1,7 @@
1
+ function o(t) {
2
+ const s = t.startsWith("'") && t.endsWith("'"), n = t.startsWith('"') && t.endsWith('"');
3
+ return s || n ? t : `"${t}"`;
4
+ }
5
+ export {
6
+ o as ensureQuotes
7
+ };
@@ -0,0 +1,25 @@
1
+ import { countries as h } from "@arkyn/templates";
2
+ import { parsePhoneNumberWithError as a } from "libphonenumber-js";
3
+ import { removeNonNumeric as f } from "./removeNonNumeric.js";
4
+ function k(i) {
5
+ try {
6
+ const r = a(i), n = r == null ? void 0 : r.country;
7
+ if (!n) throw new Error("Invalid phone number");
8
+ const o = h.find((t) => t.iso === n);
9
+ if (!o) throw new Error("Phone number country not supported");
10
+ if (typeof o.mask == "string") return [o.mask, o];
11
+ const e = o.mask.find((t) => {
12
+ const s = t.replace(/[^_]/g, ""), m = f(r.nationalNumber), u = s.length, c = m.length;
13
+ return u === c;
14
+ });
15
+ if (!e)
16
+ throw new Error("No mask found for the given phone number length");
17
+ return [e, o];
18
+ } catch (r) {
19
+ const n = r;
20
+ throw new Error(n.message);
21
+ }
22
+ }
23
+ export {
24
+ k as findCountryMask
25
+ };
@@ -0,0 +1,6 @@
1
+ function n(t) {
2
+ return /<\/?[a-z][\s\S]*>/i.test(t);
3
+ }
4
+ export {
5
+ n as isHtml
6
+ };
@@ -0,0 +1,6 @@
1
+ function e(r) {
2
+ return r.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])", "gu"), "").trim();
3
+ }
4
+ export {
5
+ e as removeCurrencySymbols
6
+ };
@@ -0,0 +1,6 @@
1
+ function r(e) {
2
+ return e.replace(/[^0-9]/g, "");
3
+ }
4
+ export {
5
+ r as removeNonNumeric
6
+ };
@@ -0,0 +1,6 @@
1
+ function r(e) {
2
+ return e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, "").replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi, "").replace(/<!--[\s\S]*?-->/g, "").replace(/<\/?[a-z][a-z0-9]*[^>]*>/gi, "");
3
+ }
4
+ export {
5
+ r as stripHtmlTags
6
+ };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@arkyn/shared",
3
- "version": "3.0.1-beta.155",
4
- "main": "./dist/bundle.js",
5
- "module": "./dist/bundle.js",
3
+ "version": "3.0.1-beta.156",
4
+ "main": "./dist/index.js",
5
+ "module": "./dist/index.js",
6
6
  "type": "module",
7
7
  "types": "./dist/index.d.ts",
8
8
  "license": "Apache-2.0",
@@ -26,129 +26,155 @@
26
26
  "directory": "packages/shared"
27
27
  },
28
28
  "sideEffects": false,
29
+ "scripts": {
30
+ "test": "vitest --config vitest.config.ts",
31
+ "build": "bunx vite build && bunx tsc --project tsconfig.json --emitDeclarationOnly && bun ./generate-exports.ts",
32
+ "typecheck": "bunx tsc --project tsconfig.json --noEmit"
33
+ },
34
+ "dependencies": {
35
+ "libphonenumber-js": "^1.12.41",
36
+ "uuid": "^10.0.0"
37
+ },
38
+ "peerDependencies": {
39
+ "@arkyn/templates": ">=3.0.1-beta.145"
40
+ },
41
+ "devDependencies": {
42
+ "@types/uuid": "^10.0.0",
43
+ "bun-types": "latest",
44
+ "vitest": "^3.2.4",
45
+ "typescript": "^5.9.3",
46
+ "vite": "^5.4.21"
47
+ },
29
48
  "exports": {
30
49
  ".": {
31
- "import": "./dist/bundle.js",
32
- "types": "./dist/index.d.ts"
50
+ "import": "./dist/index.js",
51
+ "types": "./dist/index.d.ts",
52
+ "default": "./dist/index.js"
33
53
  },
34
54
  "./calculateCardInstallment": {
35
- "import": "./dist/utilities/calculateCardInstallment/index.js",
36
- "types": "./dist/utilities/calculateCardInstallment/index.d.ts"
55
+ "import": "./dist/modules/utilities/calculateCardInstallment.js",
56
+ "types": "./dist/utilities/calculateCardInstallment.d.ts",
57
+ "default": "./dist/modules/utilities/calculateCardInstallment.js"
37
58
  },
38
59
  "./ensureQuotes": {
39
- "import": "./dist/utilities/ensureQuotes/index.js",
40
- "types": "./dist/utilities/ensureQuotes/index.d.ts"
60
+ "import": "./dist/modules/utilities/ensureQuotes.js",
61
+ "types": "./dist/utilities/ensureQuotes.d.ts",
62
+ "default": "./dist/modules/utilities/ensureQuotes.js"
41
63
  },
42
64
  "./findCountryMask": {
43
- "import": "./dist/utilities/findCountryMask/index.js",
44
- "types": "./dist/utilities/findCountryMask/index.d.ts"
65
+ "import": "./dist/modules/utilities/findCountryMask.js",
66
+ "types": "./dist/utilities/findCountryMask.d.ts",
67
+ "default": "./dist/modules/utilities/findCountryMask.js"
45
68
  },
46
69
  "./formatDate": {
47
- "import": "./dist/formats/formatDate/index.js",
48
- "types": "./dist/formats/formatDate/index.d.ts"
70
+ "import": "./dist/modules/formats/formatDate.js",
71
+ "types": "./dist/formats/formatDate.d.ts",
72
+ "default": "./dist/modules/formats/formatDate.js"
49
73
  },
50
74
  "./formatJsonObject": {
51
- "import": "./dist/formats/formatJsonObject/index.js",
52
- "types": "./dist/formats/formatJsonObject/index.d.ts"
75
+ "import": "./dist/modules/formats/formatJsonObject.js",
76
+ "types": "./dist/formats/formatJsonObject.d.ts",
77
+ "default": "./dist/modules/formats/formatJsonObject.js"
53
78
  },
54
79
  "./formatJsonString": {
55
- "import": "./dist/formats/formatJsonString/index.js",
56
- "types": "./dist/formats/formatJsonString/index.d.ts"
80
+ "import": "./dist/modules/formats/formatJsonString.js",
81
+ "types": "./dist/formats/formatJsonString.d.ts",
82
+ "default": "./dist/modules/formats/formatJsonString.js"
57
83
  },
58
84
  "./formatToCapitalizeFirstWordLetter": {
59
- "import": "./dist/formats/formatToCapitalizeFirstWordLetter/index.js",
60
- "types": "./dist/formats/formatToCapitalizeFirstWordLetter/index.d.ts"
85
+ "import": "./dist/modules/formats/formatToCapitalizeFirstWordLetter.js",
86
+ "types": "./dist/formats/formatToCapitalizeFirstWordLetter.d.ts",
87
+ "default": "./dist/modules/formats/formatToCapitalizeFirstWordLetter.js"
61
88
  },
62
89
  "./formatToCep": {
63
- "import": "./dist/formats/formatToCep/index.js",
64
- "types": "./dist/formats/formatToCep/index.d.ts"
90
+ "import": "./dist/modules/formats/formatToCep.js",
91
+ "types": "./dist/formats/formatToCep.d.ts",
92
+ "default": "./dist/modules/formats/formatToCep.js"
65
93
  },
66
94
  "./formatToCnpj": {
67
- "import": "./dist/formats/formatToCnpj/index.js",
68
- "types": "./dist/formats/formatToCnpj/index.d.ts"
95
+ "import": "./dist/modules/formats/formatToCnpj.js",
96
+ "types": "./dist/formats/formatToCnpj.d.ts",
97
+ "default": "./dist/modules/formats/formatToCnpj.js"
69
98
  },
70
99
  "./formatToCpf": {
71
- "import": "./dist/formats/formatToCpf/index.js",
72
- "types": "./dist/formats/formatToCpf/index.d.ts"
100
+ "import": "./dist/modules/formats/formatToCpf.js",
101
+ "types": "./dist/formats/formatToCpf.d.ts",
102
+ "default": "./dist/modules/formats/formatToCpf.js"
73
103
  },
74
104
  "./formatToCurrency": {
75
- "import": "./dist/formats/formatToCurrency/index.js",
76
- "types": "./dist/formats/formatToCurrency/index.d.ts"
105
+ "import": "./dist/modules/formats/formatToCurrency.js",
106
+ "types": "./dist/formats/formatToCurrency.d.ts",
107
+ "default": "./dist/modules/formats/formatToCurrency.js"
77
108
  },
78
109
  "./formatToEllipsis": {
79
- "import": "./dist/formats/formatToEllipsis/index.js",
80
- "types": "./dist/formats/formatToEllipsis/index.d.ts"
110
+ "import": "./dist/modules/formats/formatToEllipsis.js",
111
+ "types": "./dist/formats/formatToEllipsis.d.ts",
112
+ "default": "./dist/modules/formats/formatToEllipsis.js"
81
113
  },
82
114
  "./formatToHiddenDigits": {
83
- "import": "./dist/formats/formatToHiddenDigits/index.js",
84
- "types": "./dist/formats/formatToHiddenDigits/index.d.ts"
115
+ "import": "./dist/modules/formats/formatToHiddenDigits.js",
116
+ "types": "./dist/formats/formatToHiddenDigits.d.ts",
117
+ "default": "./dist/modules/formats/formatToHiddenDigits.js"
85
118
  },
86
119
  "./formatToPhone": {
87
- "import": "./dist/formats/formatToPhone/index.js",
88
- "types": "./dist/formats/formatToPhone/index.d.ts"
120
+ "import": "./dist/modules/formats/formatToPhone.js",
121
+ "types": "./dist/formats/formatToPhone.d.ts",
122
+ "default": "./dist/modules/formats/formatToPhone.js"
89
123
  },
90
124
  "./generateColorByString": {
91
- "import": "./dist/generators/generateColorByString/index.js",
92
- "types": "./dist/generators/generateColorByString/index.d.ts"
125
+ "import": "./dist/modules/generators/generateColorByString.js",
126
+ "types": "./dist/generators/generateColorByString.d.ts",
127
+ "default": "./dist/modules/generators/generateColorByString.js"
93
128
  },
94
129
  "./generateId": {
95
- "import": "./dist/generators/generateId/index.js",
96
- "types": "./dist/generators/generateId/index.d.ts"
130
+ "import": "./dist/modules/generators/generateId.js",
131
+ "types": "./dist/generators/generateId.d.ts",
132
+ "default": "./dist/modules/generators/generateId.js"
97
133
  },
98
134
  "./generateSlug": {
99
- "import": "./dist/generators/generateSlug/index.js",
100
- "types": "./dist/generators/generateSlug/index.d.ts"
135
+ "import": "./dist/modules/generators/generateSlug.js",
136
+ "types": "./dist/generators/generateSlug.d.ts",
137
+ "default": "./dist/modules/generators/generateSlug.js"
101
138
  },
102
139
  "./isHtml": {
103
- "import": "./dist/utilities/isHtml/index.js",
104
- "types": "./dist/utilities/isHtml/index.d.ts"
140
+ "import": "./dist/modules/utilities/isHtml.js",
141
+ "types": "./dist/utilities/isHtml.d.ts",
142
+ "default": "./dist/modules/utilities/isHtml.js"
105
143
  },
106
144
  "./parseLargeFields": {
107
- "import": "./dist/parsers/parseLargeFields/index.js",
108
- "types": "./dist/parsers/parseLargeFields/index.d.ts"
145
+ "import": "./dist/modules/parsers/parseLargeFields.js",
146
+ "types": "./dist/parsers/parseLargeFields.d.ts",
147
+ "default": "./dist/modules/parsers/parseLargeFields.js"
109
148
  },
110
149
  "./parseSensitiveData": {
111
- "import": "./dist/parsers/parseSensitiveData/index.js",
112
- "types": "./dist/parsers/parseSensitiveData/index.d.ts"
150
+ "import": "./dist/modules/parsers/parseSensitiveData.js",
151
+ "types": "./dist/parsers/parseSensitiveData.d.ts",
152
+ "default": "./dist/modules/parsers/parseSensitiveData.js"
113
153
  },
114
154
  "./parseToDate": {
115
- "import": "./dist/parsers/parseToDate/index.js",
116
- "types": "./dist/parsers/parseToDate/index.d.ts"
155
+ "import": "./dist/modules/parsers/parseToDate.js",
156
+ "types": "./dist/parsers/parseToDate.d.ts",
157
+ "default": "./dist/modules/parsers/parseToDate.js"
117
158
  },
118
159
  "./removeCurrencySymbols": {
119
- "import": "./dist/utilities/removeCurrencySymbols/index.js",
120
- "types": "./dist/utilities/removeCurrencySymbols/index.d.ts"
160
+ "import": "./dist/modules/utilities/removeCurrencySymbols.js",
161
+ "types": "./dist/utilities/removeCurrencySymbols.d.ts",
162
+ "default": "./dist/modules/utilities/removeCurrencySymbols.js"
121
163
  },
122
164
  "./removeNonNumeric": {
123
- "import": "./dist/utilities/removeNonNumeric/index.js",
124
- "types": "./dist/utilities/removeNonNumeric/index.d.ts"
165
+ "import": "./dist/modules/utilities/removeNonNumeric.js",
166
+ "types": "./dist/utilities/removeNonNumeric.d.ts",
167
+ "default": "./dist/modules/utilities/removeNonNumeric.js"
125
168
  },
126
169
  "./stripHtmlTags": {
127
- "import": "./dist/utilities/stripHtmlTags/index.js",
128
- "types": "./dist/utilities/stripHtmlTags/index.d.ts"
170
+ "import": "./dist/modules/utilities/stripHtmlTags.js",
171
+ "types": "./dist/utilities/stripHtmlTags.d.ts",
172
+ "default": "./dist/modules/utilities/stripHtmlTags.js"
129
173
  },
130
174
  "./validateDateService": {
131
- "import": "./dist/services/validateDateService/index.js",
132
- "types": "./dist/services/validateDateService/index.d.ts"
175
+ "import": "./dist/modules/services/validateDateService.js",
176
+ "types": "./dist/services/validateDateService.d.ts",
177
+ "default": "./dist/modules/services/validateDateService.js"
133
178
  }
134
- },
135
- "scripts": {
136
- "build": "bunx vite build && tsc && bun ./generate-exports.ts",
137
- "test": "vitest --config vitest.config.ts",
138
- "typecheck": "bunx tsc --project tsconfig.json --noEmit"
139
- },
140
- "dependencies": {
141
- "libphonenumber-js": "^1.12.41",
142
- "uuid": "^10.0.0"
143
- },
144
- "peerDependencies": {
145
- "@arkyn/templates": ">=3.0.1-beta.145"
146
- },
147
- "devDependencies": {
148
- "@types/uuid": "^10.0.0",
149
- "bun-types": "latest",
150
- "vitest": "^3.2.4",
151
- "typescript": "^5.9.3",
152
- "vite": "^5.4.21"
153
179
  }
154
180
  }