nhb-toolbox 4.1.6 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +9 -1
- package/dist/cjs/date/Chronos.js +42 -17
- package/dist/cjs/index.js +19 -4
- package/dist/dts/date/Chronos.d.ts +6 -1
- package/dist/dts/date/Chronos.d.ts.map +1 -1
- package/dist/dts/date/types.d.ts +6 -1
- package/dist/dts/date/types.d.ts.map +1 -1
- package/dist/dts/index.d.ts +17 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/date/Chronos.js +42 -17
- package/dist/esm/index.js +17 -2
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the license notice for easier identification
|
|
187
|
+
within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Nazmul Hassan
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
# NHB
|
|
1
|
+
# NHB Toolbox
|
|
2
|
+
|
|
3
|
+
## License
|
|
4
|
+
|
|
5
|
+
This project is licensed under the [Apache License 2.0](./LICENSE) with the following additional requirement:
|
|
6
|
+
|
|
7
|
+
> Any fork, derivative work, or redistribution of this project must include clear attribution to [**Nazmul Hassan**](https://github.com/nazmul-nhb) in both the source code and any publicly available documentation.
|
|
8
|
+
|
|
9
|
+
You are free to use, modify, and distribute this project under the terms of the Apache 2.0 License, provided that appropriate credit is given.
|
|
2
10
|
|
|
3
11
|
## _“I solve problems you face daily”_
|
|
4
12
|
|
package/dist/cjs/date/Chronos.js
CHANGED
|
@@ -1357,16 +1357,21 @@ class Chronos {
|
|
|
1357
1357
|
return new Chronos(utc).#withOrigin('toLocal');
|
|
1358
1358
|
}
|
|
1359
1359
|
/**
|
|
1360
|
-
* @static Parses a date string with a given format (
|
|
1360
|
+
* @static Parses a date string with a given format (limited support only).
|
|
1361
1361
|
*
|
|
1362
1362
|
* * **Supported format tokens**:
|
|
1363
1363
|
* - `YYYY`: Full year (e.g., 2023)
|
|
1364
1364
|
* - `YY`: Two-digit year (e.g., 23 for 2023, 99 for 1999)
|
|
1365
1365
|
* - `MM`: Month (01-12)
|
|
1366
|
+
* - `M`: Month (1-9)
|
|
1366
1367
|
* - `DD`: Day of the month (01-31)
|
|
1368
|
+
* - `D`: Day of the month (1-9)
|
|
1367
1369
|
* - `HH`: Hour (00-23)
|
|
1370
|
+
* - `H`: Hour (0-9)
|
|
1368
1371
|
* - `mm`: Minute (00-59)
|
|
1372
|
+
* - `m`: Minute (0-9)
|
|
1369
1373
|
* - `ss`: Second (00-59)
|
|
1374
|
+
* - `s`: Second (0-9)
|
|
1370
1375
|
*
|
|
1371
1376
|
* **Example**:
|
|
1372
1377
|
* ```ts
|
|
@@ -1380,35 +1385,55 @@ class Chronos {
|
|
|
1380
1385
|
* @throws `Error` If the date string does not match the format.
|
|
1381
1386
|
*/
|
|
1382
1387
|
static parse(dateStr, format) {
|
|
1383
|
-
const
|
|
1388
|
+
const tokenPatterns = {
|
|
1389
|
+
YYYY: '(?<YYYY>\\d{4})',
|
|
1390
|
+
YY: '(?<YY>\\d{2})',
|
|
1391
|
+
MM: '(?<MM>\\d{2})',
|
|
1392
|
+
M: '(?<M>\\d{1,2})',
|
|
1393
|
+
DD: '(?<DD>\\d{2})',
|
|
1394
|
+
D: '(?<D>\\d{1,2})',
|
|
1395
|
+
HH: '(?<HH>\\d{2})',
|
|
1396
|
+
H: '(?<H>\\d{1,2})',
|
|
1397
|
+
mm: '(?<mm>\\d{2})',
|
|
1398
|
+
m: '(?<m>\\d{1,2})',
|
|
1399
|
+
ss: '(?<ss>\\d{2})',
|
|
1400
|
+
s: '(?<s>\\d{1,2})',
|
|
1401
|
+
};
|
|
1402
|
+
const tokenToComponent = {
|
|
1384
1403
|
YYYY: 'year',
|
|
1385
1404
|
YY: 'year',
|
|
1386
1405
|
MM: 'month',
|
|
1406
|
+
M: 'month',
|
|
1387
1407
|
DD: 'date',
|
|
1408
|
+
D: 'date',
|
|
1388
1409
|
HH: 'hour',
|
|
1410
|
+
H: 'hour',
|
|
1389
1411
|
mm: 'minute',
|
|
1412
|
+
m: 'minute',
|
|
1390
1413
|
ss: 'second',
|
|
1414
|
+
s: 'second',
|
|
1391
1415
|
};
|
|
1392
|
-
const
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1416
|
+
const tokenRegex = new RegExp(Object.keys(tokenPatterns).join('|'), 'g');
|
|
1417
|
+
const trimmedInput = dateStr.trim();
|
|
1418
|
+
const regexStr = format
|
|
1419
|
+
.trim()
|
|
1420
|
+
.replace(tokenRegex, (token) => tokenPatterns[token] ?? token)
|
|
1421
|
+
.replace(/\s+/g, '\\s*');
|
|
1422
|
+
const match = new RegExp(`^${regexStr}\\s*$`).exec(trimmedInput);
|
|
1396
1423
|
if (!match?.groups) {
|
|
1397
1424
|
throw new Error('Invalid date format');
|
|
1398
1425
|
}
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1426
|
+
const parts = {};
|
|
1427
|
+
for (const [token, value] of Object.entries(match.groups)) {
|
|
1428
|
+
const key = tokenToComponent[token];
|
|
1429
|
+
if (key) {
|
|
1430
|
+
let num = Number(value);
|
|
1431
|
+
if (token === 'YY')
|
|
1432
|
+
num += num < 100 ? 2000 : 0;
|
|
1433
|
+
parts[key] = num;
|
|
1403
1434
|
}
|
|
1404
|
-
return acc;
|
|
1405
|
-
}, {});
|
|
1406
|
-
// Adjust for 2-digit year (YY) by assuming the year is in the 1900s or 2000s
|
|
1407
|
-
if (values.year && values.year < 100) {
|
|
1408
|
-
// Assuming 21st century for years < 100 (00-99 becomes 2000-2099)
|
|
1409
|
-
values.year += 2000;
|
|
1410
1435
|
}
|
|
1411
|
-
return new Chronos(new Date(
|
|
1436
|
+
return new Chronos(new Date(parts.year ?? 1970, (parts.month ?? 1) - 1, parts.date ?? 1, parts.hour ?? 0, parts.minute ?? 0, parts.second ?? 0)).#withOrigin('parse');
|
|
1412
1437
|
}
|
|
1413
1438
|
/**
|
|
1414
1439
|
* * Rounds the current date-time to the nearest specified unit and interval.
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2025 Nazmul Hassan
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
2
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.getFibonacciNumbers = exports.getFibonacci = exports.generateFibonacci = exports.fibonacciGenerator = exports.calculatePercentage = exports.UnitConverter = exports.Unit = exports.Currency = exports.sumOfNumbers = exports.sumNumbers = exports.sumDigits = exports.reverseNumber = exports.getSumOfNumbers = exports.getRandomNumber = exports.getAverageOfNumbers = exports.getAverage = exports.convertToDecimal = exports.calculateLCM = exports.calculateLCD = exports.calculateHCF = exports.calculateGCD = exports.calculateAverage = exports.wordCount = exports.levenshteinDistance = exports.getLevenshteinDistance = exports.extractNumbersFromString = exports.countWordsInString = exports.countWords = exports.slugifyString = exports.reverseString = exports.replaceAllInString = exports.normalizeString = exports.maskString = exports.formatWithPlural = exports.formatUnitWithPlural = exports.formatNumberWithPluralUnit = exports.extractURLs = exports.extractEmails = exports.convertStringCase = exports.isSnakeCase = exports.isPascalCase = exports.isPalindrome = exports.isKebabCase = exports.isEmojiOnly = exports.isCamelCase = exports.generateAnagrams = exports.truncateString = exports.trimString = exports.generateRandomID = exports.capitalizeString = void 0;
|
|
4
|
-
exports.convertHslaToRgba = exports.convertHslaToHex8 = exports.convertHexToRgb = exports.convertHexToHsl = exports.convertHex8ToRgba = exports.convertHex8ToHsla = exports.convertColorCode = exports.generateRandomHSLColor = exports.generateRandomColorInHexRGB = exports.getColorForInitial = exports.getNumbersInRange = exports.roundToNearestInterval = exports.roundToNearest = exports.roundNumberToNearestInterval = exports.roundNumber = exports.numberToOrdinal = exports.getRandomFloat = exports.getRandomDecimal = exports.getOrdinalNumber = exports.getOrdinal = exports.formatCurrency = exports.convertToOrdinal = exports.convertNumberToOrdinal = exports.convertNumberToCurrency = exports.clampNumber = exports.cardinalToOrdinal = exports.isPrimeNumber = exports.isPrime = exports.getPrimeNumbers = exports.findPrimeNumbers = exports.
|
|
19
|
+
exports.convertHslaToRgba = exports.convertHslaToHex8 = exports.convertHexToRgb = exports.convertHexToHsl = exports.convertHex8ToRgba = exports.convertHex8ToHsla = exports.convertColorCode = exports.generateRandomHSLColor = exports.generateRandomColorInHexRGB = exports.getColorForInitial = exports.getNumbersInRange = exports.roundToNearestInterval = exports.roundToNearest = exports.roundNumberToNearestInterval = exports.roundNumber = exports.numberToOrdinal = exports.getRandomFloat = exports.getRandomDecimal = exports.getOrdinalNumber = exports.getOrdinal = exports.formatCurrency = exports.convertToOrdinal = exports.convertNumberToOrdinal = exports.convertNumberToCurrency = exports.clampNumber = exports.cardinalToOrdinal = exports.isPrimeNumber = exports.isPrime = exports.getPrimeNumbers = exports.findPrimeNumbers = exports.numericToRoman = exports.numberToWords = exports.convertToRomanNumerals = exports.convertNumberToWords = exports.isPerfectSquare = exports.isParOfFibonacciSeries = exports.isParOfFibonacci = exports.isOddNumber = exports.isOdd = exports.isMultiple = exports.isInvalidNumbers = exports.isFibonacci = exports.isEvenNumber = exports.isEven = exports.areInvalidNumbers = exports.getNthFibonacci = exports.getMemoizedFibonacciSeries = exports.getMemoizedFibonacci = exports.getFibonacciSeriesMemo = exports.getFibonacciSeries = void 0;
|
|
5
20
|
exports.extractDuplicates = exports.createOptionsArray = exports.sortAnArray = exports.Finder = exports.shuffleArray = exports.isValidEmptyArray = exports.isInvalidOrEmptyArray = exports.getLastArrayElement = exports.flattenArray = exports.filterArrayOfObjects = exports.minutesToUTCOffset = exports.getTotalMinutesFromUTC = exports.getTotalMinutesFromTime = exports.getTotalMinutes = exports.getTimeStringFromUTC = exports.getMinutesFromUTC = exports.getCurrentTime = exports.getCurrentDateTime = exports.formatUTCOffset = exports.extractTotalMinutesFromTime = exports.extractTimeStringFromUTC = exports.extractTimeFromUTC = exports.extractMinutesFromUTC = exports.extractHourMinute = exports.convertMinutesToUTCOffset = exports.chronusts = exports.chronusjs = exports.chronus = exports.chronosts = exports.chronosjs = exports.chronos = exports.Chronus = exports.Chronos = exports.isValidUTCOffSet = exports.isValidUTC = exports.isValidTimeString = exports.isValidTime = exports.isLeapYear = exports.greet = exports.getGreeting = exports.generateGreeting = exports.Colour = exports.Color = exports.convertRgbToRgba = exports.convertRgbToHsl = exports.convertRgbToHex = exports.convertRgbaToHsla = exports.convertRgbaToHex8 = exports.convertHslToRgb = exports.convertHslToHex = void 0;
|
|
6
21
|
exports.remapFields = exports.pickObjectFieldsByCondition = exports.pickObjectFields = exports.pickFieldsByCondition = exports.pickFields = exports.convertObjectValues = exports.sanitizeData = exports.parseStringifiedValues = exports.parseStringifiedPrimitives = exports.parseStringifiedObjectValues = exports.parsePrimitives = exports.parsePrimitiveData = exports.parseObjectValues = exports.parseJsonToObject = exports.mergeObjects = exports.mergeAndFlattenObjects = exports.flattenObjectKeyValue = exports.flattenObjectDotNotation = exports.extractUpdatedFields = exports.extractUpdatedAndNewFields = exports.extractNewFields = exports.countObjectFields = exports.cloneObject = exports.isValidFormData = exports.isOriginFileObj = exports.isFileUpload = exports.isFileList = exports.isFileArray = exports.isCustomFileArray = exports.isCustomFile = exports.serializeForm = exports.parseFormData = exports.createFormData = exports.createControlledFormData = exports.convertIntoFormData = exports.naturalSortForString = exports.naturalSort = exports.compareSorter = exports.compareNaturally = exports.splitArray = exports.rotateArray = exports.removeDuplicatesFromArray = exports.removeDuplicates = exports.moveArrayElement = exports.getMissingElements = exports.getDuplicatesFromArray = exports.getDuplicates = exports.findMissingElements = exports.extractMissingElements = exports.extractDuplicatesFromArray = void 0;
|
|
7
|
-
exports.isArrayWithLength = exports.isArrayOfType = exports.isArray = exports.doesReturnPromise = exports.isUndefined = exports.isTruthy = exports.isSymbol = exports.isString = exports.isPrimitive = exports.isPositiveInteger = exports.isNumber = exports.isNull = exports.isNonEmptyString = exports.isInteger = exports.isFalsy = exports.isBoolean = exports.Paginator = exports.throttleAction = exports.parsePrimitivesDeep = exports.parseJsonDeep = exports.parseJSON = exports.isDeepEqual = exports.getStaticMethodsCount = exports.getStaticMethodNames = exports.getInstanceMethodsCount = exports.getInstanceMethodNames = exports.getClassDetails = exports.deepParsePrimitives = exports.debounceAction = exports.countStaticMethods = exports.countInstanceMethods = exports.convertArrayToString = exports.saveToSessionStorage = exports.saveToLocalStorage = exports.removeFromSessionStorage = exports.removeFromLocalStorage = exports.getFromSessionStorage = exports.getFromLocalStorage = exports.toggleFullScreen = exports.smoothScrollTo = exports.copyToClipboard = exports.updateQueryParam = exports.
|
|
22
|
+
exports.isArrayWithLength = exports.isArrayOfType = exports.isArray = exports.doesReturnPromise = exports.isUndefined = exports.isTruthy = exports.isSymbol = exports.isString = exports.isPrimitive = exports.isPositiveInteger = exports.isNumber = exports.isNull = exports.isNonEmptyString = exports.isInteger = exports.isFalsy = exports.isBoolean = exports.Paginator = exports.throttleAction = exports.parsePrimitivesDeep = exports.parseJsonDeep = exports.parseJSON = exports.isDeepEqual = exports.getStaticMethodsCount = exports.getStaticMethodNames = exports.getInstanceMethodsCount = exports.getInstanceMethodNames = exports.getClassDetails = exports.deepParsePrimitives = exports.debounceAction = exports.countStaticMethods = exports.countInstanceMethods = exports.convertArrayToString = exports.saveToSessionStorage = exports.saveToLocalStorage = exports.removeFromSessionStorage = exports.removeFromLocalStorage = exports.getFromSessionStorage = exports.getFromLocalStorage = exports.toggleFullScreen = exports.smoothScrollTo = exports.copyToClipboard = exports.updateQueryParam = exports.queryStringToObject = exports.parseQueryString = exports.getQueryStringAsObject = exports.getQueryParams = exports.generateQueryParams = exports.formatQueryParams = exports.createQueryParams = exports.remapObjectFields = void 0;
|
|
8
23
|
exports.isValidURL = exports.isValidEmail = exports.isUUID = exports.isURL = exports.isPhoneNumber = exports.isNumericString = exports.isNodeEnvironment = exports.isNodeENV = exports.isNode = exports.isIPAddress = exports.isExpectedNodeENV = exports.isEnvironment = exports.isEmailArray = exports.isEmail = exports.isDateString = exports.isBrowser = exports.isBase64 = exports.isValidSet = exports.isValidObject = exports.isValidMap = exports.isValidJSON = exports.isValidArray = exports.isSet = exports.isReturningPromise = exports.isRegularExpression = exports.isRegExp = exports.isPromise = exports.isObjectWithKeys = exports.isObjectEmpty = exports.isObject = exports.isNotEmptyObject = exports.isMethodDescriptor = exports.isMethod = exports.isMap = exports.isJSONObject = exports.isJSON = exports.isFunction = exports.isError = exports.isEmptyObjectGuard = exports.isEmptyObject = exports.isDate = exports.isBigInt = void 0;
|
|
9
24
|
// ! String Utilities
|
|
10
25
|
var basics_1 = require("./string/basics");
|
|
@@ -88,8 +103,8 @@ Object.defineProperty(exports, "isPerfectSquare", { enumerable: true, get: funct
|
|
|
88
103
|
var convert_2 = require("./number/convert");
|
|
89
104
|
Object.defineProperty(exports, "convertNumberToWords", { enumerable: true, get: function () { return convert_2.numberToWords; } });
|
|
90
105
|
Object.defineProperty(exports, "convertToRomanNumerals", { enumerable: true, get: function () { return convert_2.convertToRomanNumerals; } });
|
|
91
|
-
Object.defineProperty(exports, "numericToRoman", { enumerable: true, get: function () { return convert_2.convertToRomanNumerals; } });
|
|
92
106
|
Object.defineProperty(exports, "numberToWords", { enumerable: true, get: function () { return convert_2.numberToWords; } });
|
|
107
|
+
Object.defineProperty(exports, "numericToRoman", { enumerable: true, get: function () { return convert_2.convertToRomanNumerals; } });
|
|
93
108
|
var prime_1 = require("./number/prime");
|
|
94
109
|
Object.defineProperty(exports, "findPrimeNumbers", { enumerable: true, get: function () { return prime_1.findPrimeNumbers; } });
|
|
95
110
|
Object.defineProperty(exports, "getPrimeNumbers", { enumerable: true, get: function () { return prime_1.findPrimeNumbers; } });
|
|
@@ -256,9 +271,9 @@ Object.defineProperty(exports, "createQueryParams", { enumerable: true, get: fun
|
|
|
256
271
|
Object.defineProperty(exports, "formatQueryParams", { enumerable: true, get: function () { return query_1.generateQueryParams; } });
|
|
257
272
|
Object.defineProperty(exports, "generateQueryParams", { enumerable: true, get: function () { return query_1.generateQueryParams; } });
|
|
258
273
|
Object.defineProperty(exports, "getQueryParams", { enumerable: true, get: function () { return query_1.getQueryParams; } });
|
|
274
|
+
Object.defineProperty(exports, "getQueryStringAsObject", { enumerable: true, get: function () { return query_1.parseQueryString; } });
|
|
259
275
|
Object.defineProperty(exports, "parseQueryString", { enumerable: true, get: function () { return query_1.parseQueryString; } });
|
|
260
276
|
Object.defineProperty(exports, "queryStringToObject", { enumerable: true, get: function () { return query_1.parseQueryString; } });
|
|
261
|
-
Object.defineProperty(exports, "getQueryStringAsObject", { enumerable: true, get: function () { return query_1.parseQueryString; } });
|
|
262
277
|
Object.defineProperty(exports, "updateQueryParam", { enumerable: true, get: function () { return query_1.updateQueryParam; } });
|
|
263
278
|
var utils_3 = require("./dom/utils");
|
|
264
279
|
Object.defineProperty(exports, "copyToClipboard", { enumerable: true, get: function () { return utils_3.copyToClipboard; } });
|
|
@@ -593,16 +593,21 @@ export declare class Chronos {
|
|
|
593
593
|
/** @instance Returns new Chronos instance in local time */
|
|
594
594
|
toLocal(): Chronos;
|
|
595
595
|
/**
|
|
596
|
-
* @static Parses a date string with a given format (
|
|
596
|
+
* @static Parses a date string with a given format (limited support only).
|
|
597
597
|
*
|
|
598
598
|
* * **Supported format tokens**:
|
|
599
599
|
* - `YYYY`: Full year (e.g., 2023)
|
|
600
600
|
* - `YY`: Two-digit year (e.g., 23 for 2023, 99 for 1999)
|
|
601
601
|
* - `MM`: Month (01-12)
|
|
602
|
+
* - `M`: Month (1-9)
|
|
602
603
|
* - `DD`: Day of the month (01-31)
|
|
604
|
+
* - `D`: Day of the month (1-9)
|
|
603
605
|
* - `HH`: Hour (00-23)
|
|
606
|
+
* - `H`: Hour (0-9)
|
|
604
607
|
* - `mm`: Minute (00-59)
|
|
608
|
+
* - `m`: Minute (0-9)
|
|
605
609
|
* - `ss`: Second (00-59)
|
|
610
|
+
* - `s`: Second (0-9)
|
|
606
611
|
*
|
|
607
612
|
* **Example**:
|
|
608
613
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chronos.d.ts","sourceRoot":"","sources":["../../../src/date/Chronos.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,OAAO,EAIN,MAAM,EAKN,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAEX,YAAY,EACZ,cAAc,EACd,aAAa,EACb,OAAO,EACP,aAAa,EACb,aAAa,EACb,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,MAAM,SAAS,CAAC;AAGjB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,OAAO;;IAGnB,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;IAEnC;;;;;;OAMG;;IAGH;;;;;;OAMG;gBACS,KAAK,EAAE,MAAM;IAEzB;;;;;;OAMG;gBACS,KAAK,EAAE,MAAM;IAEzB;;;;;;OAMG;gBACS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6D3C;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM;IAO7C;;;;OAIG;IACH,MAAM,CAAC,SAAS,IAAI,OAAO;IAQ3B;;;;OAIG;IACH,MAAM,CAAC,QAAQ,IAAI,OAAO;IAQ1B;;;;OAIG;IACH,MAAM,CAAC,GAAG,IAAI,MAAM;IAIpB;;;OAGG;IACH,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO;IAM3C;;;OAGG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO;IAM7C;;;OAGG;IACH,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO;IAM7C;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO;IAgB9C;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,IAAI;IAIjD;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM;IAIpD;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO;CAGvD"}
|
package/dist/dts/date/types.d.ts
CHANGED
|
@@ -193,16 +193,21 @@ export interface ChronosStatics {
|
|
|
193
193
|
*/
|
|
194
194
|
now(): number;
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
196
|
+
* * Parses a date string with a given format (limited support only).
|
|
197
197
|
*
|
|
198
198
|
* * **Supported format tokens**:
|
|
199
199
|
* - `YYYY`: Full year (e.g., 2023)
|
|
200
200
|
* - `YY`: Two-digit year (e.g., 23 for 2023, 99 for 1999)
|
|
201
201
|
* - `MM`: Month (01-12)
|
|
202
|
+
* - `M`: 1-Digit Month (1-9)
|
|
202
203
|
* - `DD`: Day of the month (01-31)
|
|
204
|
+
* - `D`: 1-Digit Day of the month (1-9)
|
|
203
205
|
* - `HH`: Hour (00-23)
|
|
206
|
+
* - `H`: 1-Digit Hour (0-9)
|
|
204
207
|
* - `mm`: Minute (00-59)
|
|
208
|
+
* - `m`: 1-Digit Minute (0-9)
|
|
205
209
|
* - `ss`: Second (00-59)
|
|
210
|
+
* - `s`: 1-Digit Second (0-9)
|
|
206
211
|
*
|
|
207
212
|
* **Example**:
|
|
208
213
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/date/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,MAAM,EACN,cAAc,EACd,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,MAAM,aAAa,CAAC;AAErB,mDAAmD;AACnD,MAAM,MAAM,KAAK,GACd,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC;AAER,mDAAmD;AACnD,MAAM,MAAM,OAAO,GAChB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI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K,CAAC,CAAC,CAAC;AAE5D,2BAA2B;AAC3B,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEpC,4BAA4B;AAC5B,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
export { capitalizeString, generateRandomID, trimString, truncateString, } from './string/basics';
|
|
2
17
|
export { generateAnagrams } from './string/anagram';
|
|
3
18
|
export { isCamelCase, isEmojiOnly, isKebabCase, isPalindrome, isPascalCase, isSnakeCase, } from './string/guards';
|
|
@@ -9,7 +24,7 @@ export { Unit, Unit as UnitConverter } from './number/Unit';
|
|
|
9
24
|
export { calculatePercentage } from './number/percent';
|
|
10
25
|
export { fibonacciGenerator, fibonacciGenerator as generateFibonacci, getFibonacciSeries as getFibonacci, getFibonacciSeries as getFibonacciNumbers, getFibonacciSeries, getFibonacciSeriesMemo, getFibonacciSeriesMemo as getMemoizedFibonacci, getFibonacciSeriesMemo as getMemoizedFibonacciSeries, getNthFibonacci, } from './number/fibonacci';
|
|
11
26
|
export { areInvalidNumbers, isEven, isEven as isEvenNumber, isFibonacci, areInvalidNumbers as isInvalidNumbers, isMultiple, isOdd, isOdd as isOddNumber, isFibonacci as isParOfFibonacci, isFibonacci as isParOfFibonacciSeries, isPerfectSquare, } from './number/guards';
|
|
12
|
-
export { numberToWords as convertNumberToWords, convertToRomanNumerals, convertToRomanNumerals as numericToRoman,
|
|
27
|
+
export { numberToWords as convertNumberToWords, convertToRomanNumerals, numberToWords, convertToRomanNumerals as numericToRoman, } from './number/convert';
|
|
13
28
|
export { findPrimeNumbers, findPrimeNumbers as getPrimeNumbers, isPrime, isPrime as isPrimeNumber, } from './number/prime';
|
|
14
29
|
export { getOrdinal as cardinalToOrdinal, clampNumber, formatCurrency as convertNumberToCurrency, getOrdinal as convertNumberToOrdinal, getOrdinal as convertToOrdinal, formatCurrency, getOrdinal, getOrdinal as getOrdinalNumber, getRandomFloat as getRandomDecimal, getRandomFloat, getOrdinal as numberToOrdinal, roundToNearest as roundNumber, roundToNearest as roundNumberToNearestInterval, roundToNearest, roundToNearest as roundToNearestInterval, } from './number/utilities';
|
|
15
30
|
export { getNumbersInRange } from './number/range';
|
|
@@ -34,7 +49,7 @@ export { cloneObject, countObjectFields } from './object/basics';
|
|
|
34
49
|
export { extractNewFields, extractUpdatedAndNewFields, extractUpdatedFields, flattenObjectDotNotation, flattenObjectKeyValue, mergeAndFlattenObjects, mergeObjects, parseJsonToObject, } from './object/objectify';
|
|
35
50
|
export { parseObjectValues, parseObjectValues as parsePrimitiveData, parseObjectValues as parsePrimitives, parseObjectValues as parseStringifiedObjectValues, parseObjectValues as parseStringifiedPrimitives, parseObjectValues as parseStringifiedValues, sanitizeData, } from './object/sanitize';
|
|
36
51
|
export { convertObjectValues, pickFields, pickObjectFieldsByCondition as pickFieldsByCondition, pickFields as pickObjectFields, pickObjectFieldsByCondition, remapFields, remapFields as remapObjectFields, } from './object/convert';
|
|
37
|
-
export { generateQueryParams as createQueryParams, generateQueryParams as formatQueryParams, generateQueryParams, getQueryParams, parseQueryString
|
|
52
|
+
export { generateQueryParams as createQueryParams, generateQueryParams as formatQueryParams, generateQueryParams, getQueryParams, parseQueryString as getQueryStringAsObject, parseQueryString, parseQueryString as queryStringToObject, updateQueryParam, } from './dom/query';
|
|
38
53
|
export { copyToClipboard, smoothScrollTo, toggleFullScreen } from './dom/utils';
|
|
39
54
|
export { getFromLocalStorage, getFromSessionStorage, removeFromLocalStorage, removeFromSessionStorage, saveToLocalStorage, saveToSessionStorage, } from './dom/storage';
|
|
40
55
|
export { convertArrayToString, countInstanceMethods, countStaticMethods, debounceAction, deepParsePrimitives, getClassDetails, getInstanceMethodNames, countInstanceMethods as getInstanceMethodsCount, getStaticMethodNames, countStaticMethods as getStaticMethodsCount, isDeepEqual, parseJSON, parseJSON as parseJsonDeep, deepParsePrimitives as parsePrimitivesDeep, throttleAction, } from './utils';
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,cAAc,GACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,GACX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,oBAAoB,IAAI,0BAA0B,EAClD,oBAAoB,EACpB,oBAAoB,IAAI,gBAAgB,EACxC,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,aAAa,GACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,UAAU,EACV,UAAU,I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iBAAiB,EAClC,eAAe,EACf,aAAa,EACb,KAAK,EACL,MAAM,EACN,OAAO,IAAI,YAAY,EACvB,KAAK,IAAI,UAAU,GACnB,MAAM,mBAAmB,CAAC"}
|
package/dist/esm/date/Chronos.js
CHANGED
|
@@ -1354,16 +1354,21 @@ export class Chronos {
|
|
|
1354
1354
|
return new Chronos(utc).#withOrigin('toLocal');
|
|
1355
1355
|
}
|
|
1356
1356
|
/**
|
|
1357
|
-
* @static Parses a date string with a given format (
|
|
1357
|
+
* @static Parses a date string with a given format (limited support only).
|
|
1358
1358
|
*
|
|
1359
1359
|
* * **Supported format tokens**:
|
|
1360
1360
|
* - `YYYY`: Full year (e.g., 2023)
|
|
1361
1361
|
* - `YY`: Two-digit year (e.g., 23 for 2023, 99 for 1999)
|
|
1362
1362
|
* - `MM`: Month (01-12)
|
|
1363
|
+
* - `M`: Month (1-9)
|
|
1363
1364
|
* - `DD`: Day of the month (01-31)
|
|
1365
|
+
* - `D`: Day of the month (1-9)
|
|
1364
1366
|
* - `HH`: Hour (00-23)
|
|
1367
|
+
* - `H`: Hour (0-9)
|
|
1365
1368
|
* - `mm`: Minute (00-59)
|
|
1369
|
+
* - `m`: Minute (0-9)
|
|
1366
1370
|
* - `ss`: Second (00-59)
|
|
1371
|
+
* - `s`: Second (0-9)
|
|
1367
1372
|
*
|
|
1368
1373
|
* **Example**:
|
|
1369
1374
|
* ```ts
|
|
@@ -1377,35 +1382,55 @@ export class Chronos {
|
|
|
1377
1382
|
* @throws `Error` If the date string does not match the format.
|
|
1378
1383
|
*/
|
|
1379
1384
|
static parse(dateStr, format) {
|
|
1380
|
-
const
|
|
1385
|
+
const tokenPatterns = {
|
|
1386
|
+
YYYY: '(?<YYYY>\\d{4})',
|
|
1387
|
+
YY: '(?<YY>\\d{2})',
|
|
1388
|
+
MM: '(?<MM>\\d{2})',
|
|
1389
|
+
M: '(?<M>\\d{1,2})',
|
|
1390
|
+
DD: '(?<DD>\\d{2})',
|
|
1391
|
+
D: '(?<D>\\d{1,2})',
|
|
1392
|
+
HH: '(?<HH>\\d{2})',
|
|
1393
|
+
H: '(?<H>\\d{1,2})',
|
|
1394
|
+
mm: '(?<mm>\\d{2})',
|
|
1395
|
+
m: '(?<m>\\d{1,2})',
|
|
1396
|
+
ss: '(?<ss>\\d{2})',
|
|
1397
|
+
s: '(?<s>\\d{1,2})',
|
|
1398
|
+
};
|
|
1399
|
+
const tokenToComponent = {
|
|
1381
1400
|
YYYY: 'year',
|
|
1382
1401
|
YY: 'year',
|
|
1383
1402
|
MM: 'month',
|
|
1403
|
+
M: 'month',
|
|
1384
1404
|
DD: 'date',
|
|
1405
|
+
D: 'date',
|
|
1385
1406
|
HH: 'hour',
|
|
1407
|
+
H: 'hour',
|
|
1386
1408
|
mm: 'minute',
|
|
1409
|
+
m: 'minute',
|
|
1387
1410
|
ss: 'second',
|
|
1411
|
+
s: 'second',
|
|
1388
1412
|
};
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1413
|
+
const tokenRegex = new RegExp(Object.keys(tokenPatterns).join('|'), 'g');
|
|
1414
|
+
const trimmedInput = dateStr.trim();
|
|
1415
|
+
const regexStr = format
|
|
1416
|
+
.trim()
|
|
1417
|
+
.replace(tokenRegex, (token) => tokenPatterns[token] ?? token)
|
|
1418
|
+
.replace(/\s+/g, '\\s*');
|
|
1419
|
+
const match = new RegExp(`^${regexStr}\\s*$`).exec(trimmedInput);
|
|
1393
1420
|
if (!match?.groups) {
|
|
1394
1421
|
throw new Error('Invalid date format');
|
|
1395
1422
|
}
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1423
|
+
const parts = {};
|
|
1424
|
+
for (const [token, value] of Object.entries(match.groups)) {
|
|
1425
|
+
const key = tokenToComponent[token];
|
|
1426
|
+
if (key) {
|
|
1427
|
+
let num = Number(value);
|
|
1428
|
+
if (token === 'YY')
|
|
1429
|
+
num += num < 100 ? 2000 : 0;
|
|
1430
|
+
parts[key] = num;
|
|
1400
1431
|
}
|
|
1401
|
-
return acc;
|
|
1402
|
-
}, {});
|
|
1403
|
-
// Adjust for 2-digit year (YY) by assuming the year is in the 1900s or 2000s
|
|
1404
|
-
if (values.year && values.year < 100) {
|
|
1405
|
-
// Assuming 21st century for years < 100 (00-99 becomes 2000-2099)
|
|
1406
|
-
values.year += 2000;
|
|
1407
1432
|
}
|
|
1408
|
-
return new Chronos(new Date(
|
|
1433
|
+
return new Chronos(new Date(parts.year ?? 1970, (parts.month ?? 1) - 1, parts.date ?? 1, parts.hour ?? 0, parts.minute ?? 0, parts.second ?? 0)).#withOrigin('parse');
|
|
1409
1434
|
}
|
|
1410
1435
|
/**
|
|
1411
1436
|
* * Rounds the current date-time to the nearest specified unit and interval.
|
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2025 Nazmul Hassan
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
1
16
|
// ! String Utilities
|
|
2
17
|
export { capitalizeString, generateRandomID, trimString, truncateString, } from './string/basics';
|
|
3
18
|
export { generateAnagrams } from './string/anagram';
|
|
@@ -11,7 +26,7 @@ export { Unit, Unit as UnitConverter } from './number/Unit';
|
|
|
11
26
|
export { calculatePercentage } from './number/percent';
|
|
12
27
|
export { fibonacciGenerator, fibonacciGenerator as generateFibonacci, getFibonacciSeries as getFibonacci, getFibonacciSeries as getFibonacciNumbers, getFibonacciSeries, getFibonacciSeriesMemo, getFibonacciSeriesMemo as getMemoizedFibonacci, getFibonacciSeriesMemo as getMemoizedFibonacciSeries, getNthFibonacci, } from './number/fibonacci';
|
|
13
28
|
export { areInvalidNumbers, isEven, isEven as isEvenNumber, isFibonacci, areInvalidNumbers as isInvalidNumbers, isMultiple, isOdd, isOdd as isOddNumber, isFibonacci as isParOfFibonacci, isFibonacci as isParOfFibonacciSeries, isPerfectSquare, } from './number/guards';
|
|
14
|
-
export { numberToWords as convertNumberToWords, convertToRomanNumerals, convertToRomanNumerals as numericToRoman,
|
|
29
|
+
export { numberToWords as convertNumberToWords, convertToRomanNumerals, numberToWords, convertToRomanNumerals as numericToRoman, } from './number/convert';
|
|
15
30
|
export { findPrimeNumbers, findPrimeNumbers as getPrimeNumbers, isPrime, isPrime as isPrimeNumber, } from './number/prime';
|
|
16
31
|
export { getOrdinal as cardinalToOrdinal, clampNumber, formatCurrency as convertNumberToCurrency, getOrdinal as convertNumberToOrdinal, getOrdinal as convertToOrdinal, formatCurrency, getOrdinal, getOrdinal as getOrdinalNumber, getRandomFloat as getRandomDecimal, getRandomFloat, getOrdinal as numberToOrdinal, roundToNearest as roundNumber, roundToNearest as roundNumberToNearestInterval, roundToNearest, roundToNearest as roundToNearestInterval, } from './number/utilities';
|
|
17
32
|
export { getNumbersInRange } from './number/range';
|
|
@@ -42,7 +57,7 @@ export { extractNewFields, extractUpdatedAndNewFields, extractUpdatedFields, fla
|
|
|
42
57
|
export { parseObjectValues, parseObjectValues as parsePrimitiveData, parseObjectValues as parsePrimitives, parseObjectValues as parseStringifiedObjectValues, parseObjectValues as parseStringifiedPrimitives, parseObjectValues as parseStringifiedValues, sanitizeData, } from './object/sanitize';
|
|
43
58
|
export { convertObjectValues, pickFields, pickObjectFieldsByCondition as pickFieldsByCondition, pickFields as pickObjectFields, pickObjectFieldsByCondition, remapFields, remapFields as remapObjectFields, } from './object/convert';
|
|
44
59
|
// ! DOM Utilities
|
|
45
|
-
export { generateQueryParams as createQueryParams, generateQueryParams as formatQueryParams, generateQueryParams, getQueryParams, parseQueryString
|
|
60
|
+
export { generateQueryParams as createQueryParams, generateQueryParams as formatQueryParams, generateQueryParams, getQueryParams, parseQueryString as getQueryStringAsObject, parseQueryString, parseQueryString as queryStringToObject, updateQueryParam, } from './dom/query';
|
|
46
61
|
export { copyToClipboard, smoothScrollTo, toggleFullScreen } from './dom/utils';
|
|
47
62
|
export { getFromLocalStorage, getFromSessionStorage, removeFromLocalStorage, removeFromSessionStorage, saveToLocalStorage, saveToSessionStorage, } from './dom/storage';
|
|
48
63
|
// ! Other Utilities
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "A versatile collection of smart, efficient, and reusable utility functions and classes for everyday development needs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|