utilitify-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +338 -0
  3. package/dist/async.cjs +25 -0
  4. package/dist/async.cjs.map +1 -0
  5. package/dist/async.d.cts +104 -0
  6. package/dist/async.d.ts +104 -0
  7. package/dist/async.js +4 -0
  8. package/dist/async.js.map +1 -0
  9. package/dist/chunk-2ICNRTSN.cjs +346 -0
  10. package/dist/chunk-2ICNRTSN.cjs.map +1 -0
  11. package/dist/chunk-3DPF72DY.js +170 -0
  12. package/dist/chunk-3DPF72DY.js.map +1 -0
  13. package/dist/chunk-4CV4JOE5.js +24 -0
  14. package/dist/chunk-4CV4JOE5.js.map +1 -0
  15. package/dist/chunk-4SLYNSLH.cjs +783 -0
  16. package/dist/chunk-4SLYNSLH.cjs.map +1 -0
  17. package/dist/chunk-5WP7DWCG.js +1285 -0
  18. package/dist/chunk-5WP7DWCG.js.map +1 -0
  19. package/dist/chunk-BMQ6YPKV.js +876 -0
  20. package/dist/chunk-BMQ6YPKV.js.map +1 -0
  21. package/dist/chunk-BZCMWUKS.cjs +479 -0
  22. package/dist/chunk-BZCMWUKS.cjs.map +1 -0
  23. package/dist/chunk-C5R744DY.cjs +173 -0
  24. package/dist/chunk-C5R744DY.cjs.map +1 -0
  25. package/dist/chunk-C75J62CV.cjs +913 -0
  26. package/dist/chunk-C75J62CV.cjs.map +1 -0
  27. package/dist/chunk-CZLDE2OZ.cjs +28 -0
  28. package/dist/chunk-CZLDE2OZ.cjs.map +1 -0
  29. package/dist/chunk-DSMB6AF6.cjs +193 -0
  30. package/dist/chunk-DSMB6AF6.cjs.map +1 -0
  31. package/dist/chunk-ETWGPOPY.js +426 -0
  32. package/dist/chunk-ETWGPOPY.js.map +1 -0
  33. package/dist/chunk-FQBPVN63.cjs +403 -0
  34. package/dist/chunk-FQBPVN63.cjs.map +1 -0
  35. package/dist/chunk-G4GYQGTW.cjs +178 -0
  36. package/dist/chunk-G4GYQGTW.cjs.map +1 -0
  37. package/dist/chunk-GFDMZDMI.js +486 -0
  38. package/dist/chunk-GFDMZDMI.js.map +1 -0
  39. package/dist/chunk-HOTOYIPB.js +171 -0
  40. package/dist/chunk-HOTOYIPB.js.map +1 -0
  41. package/dist/chunk-HYADH4ZX.js +176 -0
  42. package/dist/chunk-HYADH4ZX.js.map +1 -0
  43. package/dist/chunk-JBN7C5WE.js +255 -0
  44. package/dist/chunk-JBN7C5WE.js.map +1 -0
  45. package/dist/chunk-JNCTPFTD.cjs +25 -0
  46. package/dist/chunk-JNCTPFTD.cjs.map +1 -0
  47. package/dist/chunk-N3BH3BV7.js +21 -0
  48. package/dist/chunk-N3BH3BV7.js.map +1 -0
  49. package/dist/chunk-NFPGAVRQ.js +749 -0
  50. package/dist/chunk-NFPGAVRQ.js.map +1 -0
  51. package/dist/chunk-OFFRGRBN.cjs +1332 -0
  52. package/dist/chunk-OFFRGRBN.cjs.map +1 -0
  53. package/dist/chunk-OZLKYIZL.cjs +490 -0
  54. package/dist/chunk-OZLKYIZL.cjs.map +1 -0
  55. package/dist/chunk-P3NUK46X.js +145 -0
  56. package/dist/chunk-P3NUK46X.js.map +1 -0
  57. package/dist/chunk-P7P2B7ZI.cjs +429 -0
  58. package/dist/chunk-P7P2B7ZI.cjs.map +1 -0
  59. package/dist/chunk-PB6SKSJN.cjs +150 -0
  60. package/dist/chunk-PB6SKSJN.cjs.map +1 -0
  61. package/dist/chunk-R3IXCJR7.js +378 -0
  62. package/dist/chunk-R3IXCJR7.js.map +1 -0
  63. package/dist/chunk-SD6P3WEJ.js +324 -0
  64. package/dist/chunk-SD6P3WEJ.js.map +1 -0
  65. package/dist/chunk-YSCHP26P.js +451 -0
  66. package/dist/chunk-YSCHP26P.js.map +1 -0
  67. package/dist/chunk-ZLMPRPCY.cjs +274 -0
  68. package/dist/chunk-ZLMPRPCY.cjs.map +1 -0
  69. package/dist/common-CBDYNJeh.d.cts +48 -0
  70. package/dist/common-CBDYNJeh.d.ts +48 -0
  71. package/dist/constants.cjs +42 -0
  72. package/dist/constants.cjs.map +1 -0
  73. package/dist/constants.d.cts +60 -0
  74. package/dist/constants.d.ts +60 -0
  75. package/dist/constants.js +5 -0
  76. package/dist/constants.js.map +1 -0
  77. package/dist/country/index.cjs +154 -0
  78. package/dist/country/index.cjs.map +1 -0
  79. package/dist/country/index.d.cts +1 -0
  80. package/dist/country/index.d.ts +1 -0
  81. package/dist/country/index.js +5 -0
  82. package/dist/country/index.js.map +1 -0
  83. package/dist/date/index.cjs +117 -0
  84. package/dist/date/index.cjs.map +1 -0
  85. package/dist/date/index.d.cts +283 -0
  86. package/dist/date/index.d.ts +283 -0
  87. package/dist/date/index.js +4 -0
  88. package/dist/date/index.js.map +1 -0
  89. package/dist/environment/index.cjs +73 -0
  90. package/dist/environment/index.cjs.map +1 -0
  91. package/dist/environment/index.d.cts +127 -0
  92. package/dist/environment/index.d.ts +127 -0
  93. package/dist/environment/index.js +4 -0
  94. package/dist/environment/index.js.map +1 -0
  95. package/dist/form/index.cjs +81 -0
  96. package/dist/form/index.cjs.map +1 -0
  97. package/dist/form/index.d.cts +227 -0
  98. package/dist/form/index.d.ts +227 -0
  99. package/dist/form/index.js +4 -0
  100. package/dist/form/index.js.map +1 -0
  101. package/dist/i18n.cjs +37 -0
  102. package/dist/i18n.cjs.map +1 -0
  103. package/dist/i18n.d.cts +102 -0
  104. package/dist/i18n.d.ts +102 -0
  105. package/dist/i18n.js +4 -0
  106. package/dist/i18n.js.map +1 -0
  107. package/dist/index-BXBmBHyL.d.ts +718 -0
  108. package/dist/index-BYsUCP3u.d.cts +718 -0
  109. package/dist/index-Cl26FrAZ.d.cts +362 -0
  110. package/dist/index-Cl26FrAZ.d.ts +362 -0
  111. package/dist/index.cjs +1265 -0
  112. package/dist/index.cjs.map +1 -0
  113. package/dist/index.d.cts +205 -0
  114. package/dist/index.d.ts +205 -0
  115. package/dist/index.js +277 -0
  116. package/dist/index.js.map +1 -0
  117. package/dist/schema.cjs +13 -0
  118. package/dist/schema.cjs.map +1 -0
  119. package/dist/schema.d.cts +84 -0
  120. package/dist/schema.d.ts +84 -0
  121. package/dist/schema.js +4 -0
  122. package/dist/schema.js.map +1 -0
  123. package/dist/security/index.cjs +94 -0
  124. package/dist/security/index.cjs.map +1 -0
  125. package/dist/security/index.d.cts +216 -0
  126. package/dist/security/index.d.ts +216 -0
  127. package/dist/security/index.js +5 -0
  128. package/dist/security/index.js.map +1 -0
  129. package/dist/string/index.cjs +153 -0
  130. package/dist/string/index.cjs.map +1 -0
  131. package/dist/string/index.d.cts +471 -0
  132. package/dist/string/index.d.ts +471 -0
  133. package/dist/string/index.js +4 -0
  134. package/dist/string/index.js.map +1 -0
  135. package/dist/transform/index.cjs +105 -0
  136. package/dist/transform/index.cjs.map +1 -0
  137. package/dist/transform/index.d.cts +271 -0
  138. package/dist/transform/index.d.ts +271 -0
  139. package/dist/transform/index.js +4 -0
  140. package/dist/transform/index.js.map +1 -0
  141. package/dist/validators/index.cjs +195 -0
  142. package/dist/validators/index.cjs.map +1 -0
  143. package/dist/validators/index.d.cts +2 -0
  144. package/dist/validators/index.d.ts +2 -0
  145. package/dist/validators/index.js +6 -0
  146. package/dist/validators/index.js.map +1 -0
  147. package/package.json +229 -0
@@ -0,0 +1,154 @@
1
+ 'use strict';
2
+
3
+ var chunk4SLYNSLH_cjs = require('../chunk-4SLYNSLH.cjs');
4
+ var chunkOZLKYIZL_cjs = require('../chunk-OZLKYIZL.cjs');
5
+ require('../chunk-CZLDE2OZ.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "COUNTRIES", {
10
+ enumerable: true,
11
+ get: function () { return chunk4SLYNSLH_cjs.COUNTRIES; }
12
+ });
13
+ Object.defineProperty(exports, "CURRENCIES", {
14
+ enumerable: true,
15
+ get: function () { return chunk4SLYNSLH_cjs.CURRENCIES; }
16
+ });
17
+ Object.defineProperty(exports, "convertCountryCode", {
18
+ enumerable: true,
19
+ get: function () { return chunk4SLYNSLH_cjs.convertCountryCode; }
20
+ });
21
+ Object.defineProperty(exports, "convertCurrency", {
22
+ enumerable: true,
23
+ get: function () { return chunk4SLYNSLH_cjs.convertCurrency; }
24
+ });
25
+ Object.defineProperty(exports, "convertTimeBetweenCountries", {
26
+ enumerable: true,
27
+ get: function () { return chunk4SLYNSLH_cjs.convertTimeBetweenCountries; }
28
+ });
29
+ Object.defineProperty(exports, "formatCurrency", {
30
+ enumerable: true,
31
+ get: function () { return chunk4SLYNSLH_cjs.formatCurrency; }
32
+ });
33
+ Object.defineProperty(exports, "formatTimeForCountry", {
34
+ enumerable: true,
35
+ get: function () { return chunk4SLYNSLH_cjs.formatTimeForCountry; }
36
+ });
37
+ Object.defineProperty(exports, "formatWithDialingCode", {
38
+ enumerable: true,
39
+ get: function () { return chunk4SLYNSLH_cjs.formatWithDialingCode; }
40
+ });
41
+ Object.defineProperty(exports, "getAllCountries", {
42
+ enumerable: true,
43
+ get: function () { return chunk4SLYNSLH_cjs.getAllCountries; }
44
+ });
45
+ Object.defineProperty(exports, "getAllCurrencies", {
46
+ enumerable: true,
47
+ get: function () { return chunk4SLYNSLH_cjs.getAllCurrencies; }
48
+ });
49
+ Object.defineProperty(exports, "getAllFlags", {
50
+ enumerable: true,
51
+ get: function () { return chunk4SLYNSLH_cjs.getAllFlags; }
52
+ });
53
+ Object.defineProperty(exports, "getCountriesByContinent", {
54
+ enumerable: true,
55
+ get: function () { return chunk4SLYNSLH_cjs.getCountriesByContinent; }
56
+ });
57
+ Object.defineProperty(exports, "getCountriesByDialingCode", {
58
+ enumerable: true,
59
+ get: function () { return chunk4SLYNSLH_cjs.getCountriesByDialingCode; }
60
+ });
61
+ Object.defineProperty(exports, "getCountriesByLanguage", {
62
+ enumerable: true,
63
+ get: function () { return chunk4SLYNSLH_cjs.getCountriesByLanguage; }
64
+ });
65
+ Object.defineProperty(exports, "getCountry", {
66
+ enumerable: true,
67
+ get: function () { return chunk4SLYNSLH_cjs.getCountry; }
68
+ });
69
+ Object.defineProperty(exports, "getCountryByAlpha2", {
70
+ enumerable: true,
71
+ get: function () { return chunk4SLYNSLH_cjs.getCountryByAlpha2; }
72
+ });
73
+ Object.defineProperty(exports, "getCountryByAlpha3", {
74
+ enumerable: true,
75
+ get: function () { return chunk4SLYNSLH_cjs.getCountryByAlpha3; }
76
+ });
77
+ Object.defineProperty(exports, "getCountryByNumeric", {
78
+ enumerable: true,
79
+ get: function () { return chunk4SLYNSLH_cjs.getCountryByNumeric; }
80
+ });
81
+ Object.defineProperty(exports, "getCountryFromEmoji", {
82
+ enumerable: true,
83
+ get: function () { return chunk4SLYNSLH_cjs.getCountryFromEmoji; }
84
+ });
85
+ Object.defineProperty(exports, "getCurrency", {
86
+ enumerable: true,
87
+ get: function () { return chunk4SLYNSLH_cjs.getCurrency; }
88
+ });
89
+ Object.defineProperty(exports, "getCurrencyByCountry", {
90
+ enumerable: true,
91
+ get: function () { return chunk4SLYNSLH_cjs.getCurrencyByCountry; }
92
+ });
93
+ Object.defineProperty(exports, "getCurrencySymbol", {
94
+ enumerable: true,
95
+ get: function () { return chunk4SLYNSLH_cjs.getCurrencySymbol; }
96
+ });
97
+ Object.defineProperty(exports, "getCurrentTimeInCountry", {
98
+ enumerable: true,
99
+ get: function () { return chunk4SLYNSLH_cjs.getCurrentTimeInCountry; }
100
+ });
101
+ Object.defineProperty(exports, "getDefaultTimezone", {
102
+ enumerable: true,
103
+ get: function () { return chunk4SLYNSLH_cjs.getDefaultTimezone; }
104
+ });
105
+ Object.defineProperty(exports, "getDialingCode", {
106
+ enumerable: true,
107
+ get: function () { return chunk4SLYNSLH_cjs.getDialingCode; }
108
+ });
109
+ Object.defineProperty(exports, "getFlagEmoji", {
110
+ enumerable: true,
111
+ get: function () { return chunk4SLYNSLH_cjs.getFlagEmoji; }
112
+ });
113
+ Object.defineProperty(exports, "getTimezoneOffset", {
114
+ enumerable: true,
115
+ get: function () { return chunk4SLYNSLH_cjs.getTimezoneOffset; }
116
+ });
117
+ Object.defineProperty(exports, "getTimezonesByCountry", {
118
+ enumerable: true,
119
+ get: function () { return chunk4SLYNSLH_cjs.getTimezonesByCountry; }
120
+ });
121
+ Object.defineProperty(exports, "hasValidDialingCode", {
122
+ enumerable: true,
123
+ get: function () { return chunk4SLYNSLH_cjs.hasValidDialingCode; }
124
+ });
125
+ Object.defineProperty(exports, "isFlagEmoji", {
126
+ enumerable: true,
127
+ get: function () { return chunk4SLYNSLH_cjs.isFlagEmoji; }
128
+ });
129
+ Object.defineProperty(exports, "isValidCountryCode", {
130
+ enumerable: true,
131
+ get: function () { return chunk4SLYNSLH_cjs.isValidCountryCode; }
132
+ });
133
+ Object.defineProperty(exports, "parseCurrency", {
134
+ enumerable: true,
135
+ get: function () { return chunk4SLYNSLH_cjs.parseCurrency; }
136
+ });
137
+ Object.defineProperty(exports, "searchCountries", {
138
+ enumerable: true,
139
+ get: function () { return chunk4SLYNSLH_cjs.searchCountries; }
140
+ });
141
+ Object.defineProperty(exports, "PHONE_FORMATS", {
142
+ enumerable: true,
143
+ get: function () { return chunkOZLKYIZL_cjs.PHONE_FORMATS; }
144
+ });
145
+ Object.defineProperty(exports, "getPhoneFormat", {
146
+ enumerable: true,
147
+ get: function () { return chunkOZLKYIZL_cjs.getPhoneFormat; }
148
+ });
149
+ Object.defineProperty(exports, "getSupportedPhoneCountries", {
150
+ enumerable: true,
151
+ get: function () { return chunkOZLKYIZL_cjs.getSupportedPhoneCountries; }
152
+ });
153
+ //# sourceMappingURL=index.cjs.map
154
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1 @@
1
+ export { I as COUNTRIES, J as CURRENCIES, K as PHONE_FORMATS, f as convertCountryCode, y as convertCurrency, p as convertTimeBetweenCountries, u as formatCurrency, q as formatTimeForCountry, G as formatWithDialingCode, h as getAllCountries, w as getAllCurrencies, D as getAllFlags, i as getCountriesByContinent, F as getCountriesByDialingCode, j as getCountriesByLanguage, e as getCountry, g as getCountryByAlpha2, c as getCountryByAlpha3, d as getCountryByNumeric, A as getCountryFromEmoji, r as getCurrency, t as getCurrencyByCountry, x as getCurrencySymbol, n as getCurrentTimeInCountry, m as getDefaultTimezone, E as getDialingCode, z as getFlagEmoji, L as getPhoneFormat, M as getSupportedPhoneCountries, o as getTimezoneOffset, l as getTimezonesByCountry, H as hasValidDialingCode, B as isFlagEmoji, k as isValidCountryCode, v as parseCurrency, s as searchCountries } from '../index-Cl26FrAZ.cjs';
@@ -0,0 +1 @@
1
+ export { I as COUNTRIES, J as CURRENCIES, K as PHONE_FORMATS, f as convertCountryCode, y as convertCurrency, p as convertTimeBetweenCountries, u as formatCurrency, q as formatTimeForCountry, G as formatWithDialingCode, h as getAllCountries, w as getAllCurrencies, D as getAllFlags, i as getCountriesByContinent, F as getCountriesByDialingCode, j as getCountriesByLanguage, e as getCountry, g as getCountryByAlpha2, c as getCountryByAlpha3, d as getCountryByNumeric, A as getCountryFromEmoji, r as getCurrency, t as getCurrencyByCountry, x as getCurrencySymbol, n as getCurrentTimeInCountry, m as getDefaultTimezone, E as getDialingCode, z as getFlagEmoji, L as getPhoneFormat, M as getSupportedPhoneCountries, o as getTimezoneOffset, l as getTimezonesByCountry, H as hasValidDialingCode, B as isFlagEmoji, k as isValidCountryCode, v as parseCurrency, s as searchCountries } from '../index-Cl26FrAZ.js';
@@ -0,0 +1,5 @@
1
+ export { COUNTRIES, CURRENCIES, convertCountryCode, convertCurrency, convertTimeBetweenCountries, formatCurrency, formatTimeForCountry, formatWithDialingCode, getAllCountries, getAllCurrencies, getAllFlags, getCountriesByContinent, getCountriesByDialingCode, getCountriesByLanguage, getCountry, getCountryByAlpha2, getCountryByAlpha3, getCountryByNumeric, getCountryFromEmoji, getCurrency, getCurrencyByCountry, getCurrencySymbol, getCurrentTimeInCountry, getDefaultTimezone, getDialingCode, getFlagEmoji, getTimezoneOffset, getTimezonesByCountry, hasValidDialingCode, isFlagEmoji, isValidCountryCode, parseCurrency, searchCountries } from '../chunk-NFPGAVRQ.js';
2
+ export { PHONE_FORMATS, getPhoneFormat, getSupportedPhoneCountries } from '../chunk-GFDMZDMI.js';
3
+ import '../chunk-4CV4JOE5.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,117 @@
1
+ 'use strict';
2
+
3
+ var chunkBZCMWUKS_cjs = require('../chunk-BZCMWUKS.cjs');
4
+ require('../chunk-CZLDE2OZ.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "addTime", {
9
+ enumerable: true,
10
+ get: function () { return chunkBZCMWUKS_cjs.addTime; }
11
+ });
12
+ Object.defineProperty(exports, "calculateAge", {
13
+ enumerable: true,
14
+ get: function () { return chunkBZCMWUKS_cjs.calculateAge; }
15
+ });
16
+ Object.defineProperty(exports, "diffIn", {
17
+ enumerable: true,
18
+ get: function () { return chunkBZCMWUKS_cjs.diffIn; }
19
+ });
20
+ Object.defineProperty(exports, "endOf", {
21
+ enumerable: true,
22
+ get: function () { return chunkBZCMWUKS_cjs.endOf; }
23
+ });
24
+ Object.defineProperty(exports, "formatDate", {
25
+ enumerable: true,
26
+ get: function () { return chunkBZCMWUKS_cjs.formatDate; }
27
+ });
28
+ Object.defineProperty(exports, "formatDateByLocale", {
29
+ enumerable: true,
30
+ get: function () { return chunkBZCMWUKS_cjs.formatDateByLocale; }
31
+ });
32
+ Object.defineProperty(exports, "formatRelativeTime", {
33
+ enumerable: true,
34
+ get: function () { return chunkBZCMWUKS_cjs.formatRelativeTime; }
35
+ });
36
+ Object.defineProperty(exports, "getAgeBracket", {
37
+ enumerable: true,
38
+ get: function () { return chunkBZCMWUKS_cjs.getAgeBracket; }
39
+ });
40
+ Object.defineProperty(exports, "getAgeInYears", {
41
+ enumerable: true,
42
+ get: function () { return chunkBZCMWUKS_cjs.getAgeInYears; }
43
+ });
44
+ Object.defineProperty(exports, "getDaysInMonth", {
45
+ enumerable: true,
46
+ get: function () { return chunkBZCMWUKS_cjs.getDaysInMonth; }
47
+ });
48
+ Object.defineProperty(exports, "getMinAgeDOB", {
49
+ enumerable: true,
50
+ get: function () { return chunkBZCMWUKS_cjs.getMinAgeDOB; }
51
+ });
52
+ Object.defineProperty(exports, "getTimeDiff", {
53
+ enumerable: true,
54
+ get: function () { return chunkBZCMWUKS_cjs.getTimeDiff; }
55
+ });
56
+ Object.defineProperty(exports, "isAdult", {
57
+ enumerable: true,
58
+ get: function () { return chunkBZCMWUKS_cjs.isAdult; }
59
+ });
60
+ Object.defineProperty(exports, "isAgeInRange", {
61
+ enumerable: true,
62
+ get: function () { return chunkBZCMWUKS_cjs.isAgeInRange; }
63
+ });
64
+ Object.defineProperty(exports, "isBetween", {
65
+ enumerable: true,
66
+ get: function () { return chunkBZCMWUKS_cjs.isBetween; }
67
+ });
68
+ Object.defineProperty(exports, "isInFuture", {
69
+ enumerable: true,
70
+ get: function () { return chunkBZCMWUKS_cjs.isInFuture; }
71
+ });
72
+ Object.defineProperty(exports, "isInPast", {
73
+ enumerable: true,
74
+ get: function () { return chunkBZCMWUKS_cjs.isInPast; }
75
+ });
76
+ Object.defineProperty(exports, "isLeapYear", {
77
+ enumerable: true,
78
+ get: function () { return chunkBZCMWUKS_cjs.isLeapYear; }
79
+ });
80
+ Object.defineProperty(exports, "isMinor", {
81
+ enumerable: true,
82
+ get: function () { return chunkBZCMWUKS_cjs.isMinor; }
83
+ });
84
+ Object.defineProperty(exports, "isToday", {
85
+ enumerable: true,
86
+ get: function () { return chunkBZCMWUKS_cjs.isToday; }
87
+ });
88
+ Object.defineProperty(exports, "isValidDate", {
89
+ enumerable: true,
90
+ get: function () { return chunkBZCMWUKS_cjs.isValidDate; }
91
+ });
92
+ Object.defineProperty(exports, "isWeekday", {
93
+ enumerable: true,
94
+ get: function () { return chunkBZCMWUKS_cjs.isWeekday; }
95
+ });
96
+ Object.defineProperty(exports, "isWeekend", {
97
+ enumerable: true,
98
+ get: function () { return chunkBZCMWUKS_cjs.isWeekend; }
99
+ });
100
+ Object.defineProperty(exports, "parseDate", {
101
+ enumerable: true,
102
+ get: function () { return chunkBZCMWUKS_cjs.parseDate; }
103
+ });
104
+ Object.defineProperty(exports, "startOf", {
105
+ enumerable: true,
106
+ get: function () { return chunkBZCMWUKS_cjs.startOf; }
107
+ });
108
+ Object.defineProperty(exports, "subtractTime", {
109
+ enumerable: true,
110
+ get: function () { return chunkBZCMWUKS_cjs.subtractTime; }
111
+ });
112
+ Object.defineProperty(exports, "toISODate", {
113
+ enumerable: true,
114
+ get: function () { return chunkBZCMWUKS_cjs.toISODate; }
115
+ });
116
+ //# sourceMappingURL=index.cjs.map
117
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,283 @@
1
+ /**
2
+ * Age calculation result
3
+ */
4
+ interface AgeResult {
5
+ years: number;
6
+ months: number;
7
+ days: number;
8
+ totalDays: number;
9
+ isAdult: boolean;
10
+ isSenior: boolean;
11
+ }
12
+ /**
13
+ * Calculate age from date of birth
14
+ *
15
+ * @param dob - Date of birth
16
+ * @param referenceDate - Reference date (default: now)
17
+ * @returns Age details
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * calculateAge('1990-05-15'); // { years: 35, months: 7, days: 26, ... }
22
+ * calculateAge(new Date('2000-01-01')); // { years: 26, ... }
23
+ * ```
24
+ */
25
+ declare function calculateAge(dob: Date | string, referenceDate?: Date): AgeResult;
26
+ /**
27
+ * Get age in years
28
+ *
29
+ * @param dob - Date of birth
30
+ * @returns Age in years
31
+ */
32
+ declare function getAgeInYears(dob: Date | string): number;
33
+ /**
34
+ * Check if person is adult
35
+ *
36
+ * @param dob - Date of birth
37
+ * @param minAge - Minimum adult age (default: 18)
38
+ * @returns true if adult
39
+ */
40
+ declare function isAdult(dob: Date | string, minAge?: number): boolean;
41
+ /**
42
+ * Check if person is minor
43
+ *
44
+ * @param dob - Date of birth
45
+ * @param adultAge - Adult age threshold (default: 18)
46
+ * @returns true if minor
47
+ */
48
+ declare function isMinor(dob: Date | string, adultAge?: number): boolean;
49
+ /**
50
+ * Get age bracket/category
51
+ *
52
+ * @param dob - Date of birth
53
+ * @returns Age bracket name
54
+ */
55
+ declare function getAgeBracket(dob: Date | string): string;
56
+ /**
57
+ * Get date of birth required for minimum age
58
+ *
59
+ * @param minAge - Minimum age required
60
+ * @returns Date of birth that would make someone exactly that age today
61
+ */
62
+ declare function getMinAgeDOB(minAge: number): Date;
63
+ /**
64
+ * Validate age is within range
65
+ *
66
+ * @param dob - Date of birth
67
+ * @param minAge - Minimum age
68
+ * @param maxAge - Maximum age
69
+ * @returns true if age is within range
70
+ */
71
+ declare function isAgeInRange(dob: Date | string, minAge: number, maxAge: number): boolean;
72
+
73
+ /**
74
+ * Format options for dates
75
+ */
76
+ interface DateFormatOptions {
77
+ /** Date style */
78
+ dateStyle?: 'full' | 'long' | 'medium' | 'short';
79
+ /** Time style */
80
+ timeStyle?: 'full' | 'long' | 'medium' | 'short';
81
+ /** Include time */
82
+ includeTime?: boolean;
83
+ /** Timezone */
84
+ timeZone?: string;
85
+ }
86
+ /**
87
+ * Format date by locale
88
+ *
89
+ * @param date - Date to format
90
+ * @param locale - Locale code (e.g., 'en-US', 'de-DE')
91
+ * @param options - Format options
92
+ * @returns Formatted date string
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * formatDateByLocale(new Date(), 'en-US'); // 'January 11, 2026'
97
+ * formatDateByLocale(new Date(), 'de-DE'); // '11. Januar 2026'
98
+ * ```
99
+ */
100
+ declare function formatDateByLocale(date: Date | string, locale?: string, options?: DateFormatOptions): string;
101
+ /**
102
+ * Format relative time (e.g., "2 hours ago", "in 3 days")
103
+ *
104
+ * @param date - Date to compare
105
+ * @param locale - Locale code
106
+ * @param referenceDate - Reference date (default: now)
107
+ * @returns Relative time string
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * formatRelativeTime(new Date(Date.now() - 3600000)); // '1 hour ago'
112
+ * formatRelativeTime(new Date(Date.now() + 86400000)); // 'in 1 day'
113
+ * ```
114
+ */
115
+ declare function formatRelativeTime(date: Date | string, locale?: string, referenceDate?: Date): string;
116
+ /**
117
+ * Format date as ISO string (date only)
118
+ *
119
+ * @param date - Date to format
120
+ * @returns ISO date string (YYYY-MM-DD)
121
+ */
122
+ declare function toISODate(date: Date | string): string;
123
+ /**
124
+ * Format date to common patterns
125
+ */
126
+ declare function formatDate(date: Date | string, pattern: string): string;
127
+
128
+ /**
129
+ * Check if a value is a valid date
130
+ *
131
+ * @param date - Value to check
132
+ * @returns true if valid date
133
+ */
134
+ declare function isValidDate(date: unknown): boolean;
135
+ /**
136
+ * Parse date from various formats
137
+ *
138
+ * @param value - Value to parse
139
+ * @returns Date or null
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * parseDate('2024-01-15'); // ISO format
144
+ * parseDate('15/01/2024'); // DD/MM/YYYY
145
+ * parseDate('01-15-2024'); // MM-DD-YYYY
146
+ * parseDate('2024/01/15'); // YYYY/MM/DD
147
+ * parseDate('2024-01-15T10:30:00Z'); // ISO 8601
148
+ * ```
149
+ */
150
+ declare function parseDate(value: unknown): Date | null;
151
+ /**
152
+ * Check if date is in the past
153
+ *
154
+ * @param date - Date to check
155
+ * @returns true if in the past
156
+ */
157
+ declare function isInPast(date: Date | string): boolean;
158
+ /**
159
+ * Check if date is in the future
160
+ *
161
+ * @param date - Date to check
162
+ * @returns true if in the future
163
+ */
164
+ declare function isInFuture(date: Date | string): boolean;
165
+ /**
166
+ * Check if date is today
167
+ *
168
+ * @param date - Date to check
169
+ * @returns true if today
170
+ */
171
+ declare function isToday(date: Date | string): boolean;
172
+ /**
173
+ * Check if date is a weekend
174
+ *
175
+ * @param date - Date to check
176
+ * @returns true if Saturday or Sunday
177
+ */
178
+ declare function isWeekend(date: Date | string): boolean;
179
+ /**
180
+ * Check if date is a weekday
181
+ *
182
+ * @param date - Date to check
183
+ * @returns true if Monday-Friday
184
+ */
185
+ declare function isWeekday(date: Date | string): boolean;
186
+ /**
187
+ * Check if year is a leap year
188
+ *
189
+ * @param year - Year to check
190
+ * @returns true if leap year
191
+ */
192
+ declare function isLeapYear(year: number): boolean;
193
+ /**
194
+ * Get number of days in a month
195
+ *
196
+ * @param year - Year
197
+ * @param month - Month (1-12)
198
+ * @returns Number of days
199
+ */
200
+ declare function getDaysInMonth(year: number, month: number): number;
201
+ /**
202
+ * Check if date is between two dates
203
+ *
204
+ * @param date - Date to check
205
+ * @param start - Start date
206
+ * @param end - End date
207
+ * @param inclusive - Include start and end dates
208
+ * @returns true if date is between
209
+ */
210
+ declare function isBetween(date: Date | string, start: Date | string, end: Date | string, inclusive?: boolean): boolean;
211
+
212
+ /**
213
+ * Time difference result
214
+ */
215
+ interface TimeDiff {
216
+ years: number;
217
+ months: number;
218
+ weeks: number;
219
+ days: number;
220
+ hours: number;
221
+ minutes: number;
222
+ seconds: number;
223
+ milliseconds: number;
224
+ totalDays: number;
225
+ totalHours: number;
226
+ totalMinutes: number;
227
+ totalSeconds: number;
228
+ totalMilliseconds: number;
229
+ isPast: boolean;
230
+ }
231
+ /**
232
+ * Calculate difference between two dates
233
+ *
234
+ * @param date1 - First date
235
+ * @param date2 - Second date (default: now)
236
+ * @returns Time difference
237
+ */
238
+ declare function getTimeDiff(date1: Date | string, date2?: Date | string): TimeDiff;
239
+ /**
240
+ * Get difference in specific unit
241
+ *
242
+ * @param date1 - First date
243
+ * @param date2 - Second date
244
+ * @param unit - Time unit
245
+ * @returns Difference in specified unit
246
+ */
247
+ declare function diffIn(date1: Date | string, date2: Date | string, unit: 'years' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds'): number;
248
+ /**
249
+ * Add time to date
250
+ *
251
+ * @param date - Base date
252
+ * @param amount - Amount to add
253
+ * @param unit - Time unit
254
+ * @returns New date
255
+ */
256
+ declare function addTime(date: Date | string, amount: number, unit: 'years' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds'): Date;
257
+ /**
258
+ * Subtract time from date
259
+ *
260
+ * @param date - Base date
261
+ * @param amount - Amount to subtract
262
+ * @param unit - Time unit
263
+ * @returns New date
264
+ */
265
+ declare function subtractTime(date: Date | string, amount: number, unit: 'years' | 'months' | 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds'): Date;
266
+ /**
267
+ * Get start of time period
268
+ *
269
+ * @param date - Date
270
+ * @param unit - Time unit
271
+ * @returns Start of period
272
+ */
273
+ declare function startOf(date: Date | string, unit: 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute'): Date;
274
+ /**
275
+ * Get end of time period
276
+ *
277
+ * @param date - Date
278
+ * @param unit - Time unit
279
+ * @returns End of period
280
+ */
281
+ declare function endOf(date: Date | string, unit: 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute'): Date;
282
+
283
+ export { type AgeResult, type DateFormatOptions, type TimeDiff, addTime, calculateAge, diffIn, endOf, formatDate, formatDateByLocale, formatRelativeTime, getAgeBracket, getAgeInYears, getDaysInMonth, getMinAgeDOB, getTimeDiff, isAdult, isAgeInRange, isBetween, isInFuture, isInPast, isLeapYear, isMinor, isToday, isValidDate, isWeekday, isWeekend, parseDate, startOf, subtractTime, toISODate };