toolbox-x 1.0.1-rc.1 → 1.0.1-rc.3
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/README.md +25 -23
- package/dist/{Color-BKdY0DcA.d.cts → Color-1GhgzLZY.d.cts} +1 -1
- package/dist/{Color-C02goLG6.d.mts → Color-BRYMXYpf.d.mts} +1 -1
- package/dist/{Stylog-DrSdaWDT.d.cts → Stylog-CQ8JPiQa.d.mts} +5 -5
- package/dist/{Stylog-inh9uUAW.d.mts → Stylog-DYKMtvUy.d.cts} +5 -5
- package/dist/{array-B1_68JMA.d.mts → array-33Ahzl1u.d.cts} +1 -1
- package/dist/{array-CVspDOXQ.d.cts → array-Bj0Zlb56.d.mts} +1 -1
- package/dist/{basics-DJtU6jfE.cjs → basics-CYqqguZr.cjs} +2 -2
- package/dist/{basics-voYw4fdF.mjs → basics-DQe9mP_M.mjs} +2 -2
- package/dist/{basics-TaHz41sM.d.mts → basics-DQpuG3-K.d.cts} +3 -3
- package/dist/{basics-BKsGo4JQ.d.cts → basics-gNMZM4YI.d.mts} +3 -3
- package/dist/{case-ByzUFETQ.d.cts → case-BOBkUEwA.d.cts} +1 -1
- package/dist/{case-CRZDrglq.d.mts → case-C7a3Pq8F.d.mts} +1 -1
- package/dist/change-case.d.cts +1 -1
- package/dist/change-case.d.mts +1 -1
- package/dist/colors.d.cts +2 -2
- package/dist/colors.d.mts +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{convert-BoxPCgCi.mjs → convert-C8LsoKmI.mjs} +2 -2
- package/dist/{convert-DhbwjiJ7.cjs → convert-IaWh6Wab.cjs} +2 -2
- package/dist/{converter-WvZUKSzs.d.mts → converter-BpP-vO_5.d.mts} +3 -3
- package/dist/{converter-4mLzrhbx.d.cts → converter-DywQ-FiS.d.cts} +3 -3
- package/dist/converter.cjs +2 -2
- package/dist/converter.d.cts +2 -2
- package/dist/converter.d.mts +2 -2
- package/dist/converter.mjs +2 -2
- package/dist/date.cjs +2 -2
- package/dist/date.d.cts +6 -6
- package/dist/date.d.mts +6 -6
- package/dist/date.mjs +2 -2
- package/dist/dom.cjs +2 -2
- package/dist/dom.d.cts +3 -3
- package/dist/dom.d.mts +3 -3
- package/dist/dom.mjs +2 -2
- package/dist/{form-B7QeOgNJ.d.mts → form-BP5A5bmd.d.cts} +2 -2
- package/dist/{form-Cn1dxLvO.d.cts → form-CD--FsMp.d.mts} +2 -2
- package/dist/guards.cjs +1 -1
- package/dist/guards.d.cts +3 -3
- package/dist/guards.d.mts +3 -3
- package/dist/guards.mjs +1 -1
- package/dist/{hash-BcoSckUL.d.cts → hash-B5CXLvEQ.d.mts} +1 -1
- package/dist/{hash-KrT1doZr.d.mts → hash-lchwSQ9a.d.cts} +1 -1
- package/dist/hash.cjs +6 -6
- package/dist/hash.d.cts +8 -8
- package/dist/hash.d.mts +8 -8
- package/dist/hash.mjs +6 -6
- package/dist/{http-status-CJ6-2OAH.d.cts → http-status-D-5TCYZT.d.cts} +1 -1
- package/dist/{http-status-98nJcalX.d.mts → http-status-D4O_TsrF.d.mts} +1 -1
- package/dist/http-status.cjs +3 -3
- package/dist/http-status.d.cts +5 -5
- package/dist/http-status.d.mts +5 -5
- package/dist/http-status.mjs +3 -3
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +4 -4
- package/dist/{object-BHrHfg-O.d.cts → object-DISH9Klq.d.cts} +1600 -1350
- package/dist/{object-BHrHfg-O.d.mts → object-DISH9Klq.d.mts} +1600 -1350
- package/dist/{objectify-CNhwusmC.mjs → objectify-CryKLquR.mjs} +2 -2
- package/dist/{objectify-D9262AFH.cjs → objectify-DrwoO4bJ.cjs} +2 -2
- package/dist/paginator.d.cts +1 -1
- package/dist/paginator.d.mts +1 -1
- package/dist/{pluralizer-O5sB1jMb.d.mts → pluralizer-BbaeY61M.d.cts} +1 -1
- package/dist/{pluralizer-mlxgn6H7.d.cts → pluralizer-aVFuafT2.d.mts} +1 -1
- package/dist/pluralizer.cjs +4 -4
- package/dist/pluralizer.d.cts +5 -5
- package/dist/pluralizer.d.mts +5 -5
- package/dist/pluralizer.mjs +4 -4
- package/dist/{specials-DHMIKFIa.d.cts → specials-5alXeMaU.d.mts} +1 -1
- package/dist/{specials-O2FRSbWm.d.mts → specials-D75vI-vk.d.cts} +1 -1
- package/dist/{string-C4Wi1BxL.d.mts → string-BKF5jssE.d.mts} +1 -1
- package/dist/{string-B-0GqS0y.d.cts → string-wxrxtKM0.d.cts} +1 -1
- package/dist/stylog.cjs +4 -4
- package/dist/stylog.d.cts +2 -2
- package/dist/stylog.d.mts +2 -2
- package/dist/stylog.mjs +4 -4
- package/dist/types/array.d.cts +1 -1
- package/dist/types/array.d.mts +1 -1
- package/dist/types/colors.d.cts +1 -1
- package/dist/types/colors.d.mts +1 -1
- package/dist/types/converter.d.cts +1 -1
- package/dist/types/converter.d.mts +1 -1
- package/dist/types/date.cjs +16 -0
- package/dist/types/date.d.cts +18 -0
- package/dist/types/date.d.mts +18 -0
- package/dist/types/date.mjs +17 -0
- package/dist/types/form.d.cts +1 -1
- package/dist/types/form.d.mts +1 -1
- package/dist/types/hash.d.cts +1 -1
- package/dist/types/hash.d.mts +1 -1
- package/dist/types/http-status.d.cts +1 -1
- package/dist/types/http-status.d.mts +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/number.d.cts +1 -1
- package/dist/types/number.d.mts +1 -1
- package/dist/types/object.d.cts +1 -1
- package/dist/types/object.d.mts +1 -1
- package/dist/types/pluralizer.d.cts +1 -1
- package/dist/types/pluralizer.d.mts +1 -1
- package/dist/types/string.d.cts +1 -1
- package/dist/types/string.d.mts +1 -1
- package/dist/types/stylog.d.cts +1 -1
- package/dist/types/stylog.d.mts +1 -1
- package/dist/types/utils.d.cts +1 -1
- package/dist/types/utils.d.mts +1 -1
- package/dist/{utils-DD-mfn6r.cjs → utils-B1BHomba.cjs} +2 -2
- package/dist/{utils-D8jpcedf.mjs → utils-BCytS67y.mjs} +2 -2
- package/dist/verbalizer.cjs +2 -2
- package/dist/verbalizer.d.cts +2 -2
- package/dist/verbalizer.d.mts +2 -2
- package/dist/verbalizer.mjs +2 -2
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Toolbox
|
|
1
|
+
# Toolbox-X
|
|
2
2
|
|
|
3
3
|
> “I solve problems you face daily”
|
|
4
4
|
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
</a>
|
|
46
46
|
</p>
|
|
47
47
|
|
|
48
|
+
[](https://toolbox-x.nazmul-nhb.dev/)
|
|
49
|
+
|
|
48
50
|
## JavaScript/TypeScript Utility Library
|
|
49
51
|
|
|
50
52
|
**NHB Toolbox** provides battle-tested utilities for professional JavaScript/TypeScript development. Carefully crafted to solve common challenges with elegant, production-ready solutions:
|
|
@@ -54,7 +56,7 @@
|
|
|
54
56
|
- **Validation Utilities**: Robust data validation patterns
|
|
55
57
|
- **Zero Dependencies**: Framework-agnostic implementation using only native TS/JS with 0 external package
|
|
56
58
|
|
|
57
|
-
> [Explore Full Documentation →](https://toolbox.nazmul-nhb.dev/)
|
|
59
|
+
> [Explore Full Documentation →](https://toolbox-x.nazmul-nhb.dev/)
|
|
58
60
|
|
|
59
61
|
---
|
|
60
62
|
|
|
@@ -88,7 +90,7 @@ See [Changelog](CHANGELOG.md) for recent updates.
|
|
|
88
90
|
- **Modular Design**: Tree-shaking friendly – import only what you need with zero bloat
|
|
89
91
|
- **Zero Dependencies**: No external dependencies - works with any JS/TS framework
|
|
90
92
|
- **IDE Support**: Full type hints with JSDoc-powered API references in your editor
|
|
91
|
-
- **Comprehensive Documentation**: Learn with real-world use cases on [documentation site](https://toolbox.nazmul-nhb.dev/)
|
|
93
|
+
- **Comprehensive Documentation**: Learn with real-world use cases on [documentation site](https://toolbox-x.nazmul-nhb.dev/)
|
|
92
94
|
- **Battle-Tested**: Reliable utilities refined through real-world production use
|
|
93
95
|
- **Optimized for Production**: Focused on clean, efficient implementations
|
|
94
96
|
|
|
@@ -106,7 +108,7 @@ const darkerBlue = blue.applyDarkness(20); // 20% darker
|
|
|
106
108
|
console.log(darkerBlue.hsl); // "hsl(240, 100%, 40%)" (was 50%)
|
|
107
109
|
```
|
|
108
110
|
|
|
109
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/classes/Color)
|
|
111
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/classes/Color)
|
|
110
112
|
|
|
111
113
|
---
|
|
112
114
|
|
|
@@ -123,7 +125,7 @@ const laptop = productFinder.findOne('laptop', 'category', {
|
|
|
123
125
|
});
|
|
124
126
|
```
|
|
125
127
|
|
|
126
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/classes/Finder)
|
|
128
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/classes/Finder)
|
|
127
129
|
|
|
128
130
|
---
|
|
129
131
|
|
|
@@ -140,7 +142,7 @@ generateRandomID({
|
|
|
140
142
|
}); // "USER-171234567890-AB3C4D5E6F7G"
|
|
141
143
|
```
|
|
142
144
|
|
|
143
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/string/generateRandomID)
|
|
145
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/generateRandomID)
|
|
144
146
|
|
|
145
147
|
---
|
|
146
148
|
|
|
@@ -149,7 +151,7 @@ generateRandomID({
|
|
|
149
151
|
**`pluralizer`** - Handles English word pluralization and singularization with support for irregular forms and uncountable nouns.
|
|
150
152
|
|
|
151
153
|
```ts
|
|
152
|
-
import { pluralizer } from 'toolbox-x';
|
|
154
|
+
import { pluralizer } from 'toolbox-x/pluralizer';
|
|
153
155
|
|
|
154
156
|
pluralizer.pluralize('child'); // "children"
|
|
155
157
|
pluralizer.pluralize('category', { count: 3 }); // "categories"
|
|
@@ -163,7 +165,7 @@ pluralizer.isSingular('child'); // true
|
|
|
163
165
|
pluralizer.isPlural('fish'); // true (uncountable)
|
|
164
166
|
```
|
|
165
167
|
|
|
166
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer)
|
|
168
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer)
|
|
167
169
|
|
|
168
170
|
---
|
|
169
171
|
|
|
@@ -179,7 +181,7 @@ getColorForInitial(['Alice', 'Bob', 'Charlie']);
|
|
|
179
181
|
getColorForInitial('Banana', 50); // '#00376E80' (50% opacity)
|
|
180
182
|
```
|
|
181
183
|
|
|
182
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/color/getColorForInitial)
|
|
184
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/color/getColorForInitial)
|
|
183
185
|
|
|
184
186
|
---
|
|
185
187
|
|
|
@@ -188,7 +190,7 @@ getColorForInitial('Banana', 50); // '#00376E80' (50% opacity)
|
|
|
188
190
|
**`createFormData`** - Convert JavaScript objects into `FormData` with extensive configuration options for handling nested structures, files, and data transformations.
|
|
189
191
|
|
|
190
192
|
```typescript
|
|
191
|
-
import { createFormData } from 'toolbox-x';
|
|
193
|
+
import { createFormData } from 'toolbox-x/dom';
|
|
192
194
|
|
|
193
195
|
const formData = createFormData({
|
|
194
196
|
user: {
|
|
@@ -212,7 +214,7 @@ const formData = createFormData({
|
|
|
212
214
|
// files[1]=[File2]
|
|
213
215
|
```
|
|
214
216
|
|
|
215
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/form/createFormData)
|
|
217
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/form/createFormData)
|
|
216
218
|
|
|
217
219
|
---
|
|
218
220
|
|
|
@@ -236,7 +238,7 @@ sanitizeData(user, { ignoreNullish: true, ignoreEmpty: true }, 'partial');
|
|
|
236
238
|
// Returns { name: "John Doe", address: { city: "NYC" } }
|
|
237
239
|
```
|
|
238
240
|
|
|
239
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/object/sanitizeData)
|
|
241
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/object/sanitizeData)
|
|
240
242
|
|
|
241
243
|
---
|
|
242
244
|
|
|
@@ -248,7 +250,7 @@ sanitizeData(user, { ignoreNullish: true, ignoreEmpty: true }, 'partial');
|
|
|
248
250
|
parseJSON('{"value":"42"}'); // { value: 42 } (auto-converts numbers)
|
|
249
251
|
```
|
|
250
252
|
|
|
251
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/misc/parseJSON)
|
|
253
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/misc/parseJSON)
|
|
252
254
|
|
|
253
255
|
---
|
|
254
256
|
|
|
@@ -260,7 +262,7 @@ parseJSON('{"value":"42"}'); // { value: 42 } (auto-converts numbers)
|
|
|
260
262
|
numberToWords(125); // "one hundred twenty-five"
|
|
261
263
|
```
|
|
262
264
|
|
|
263
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/number/numberToWords)
|
|
265
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/number/numberToWords)
|
|
264
266
|
|
|
265
267
|
---
|
|
266
268
|
|
|
@@ -274,7 +276,7 @@ getNumbersInRange('prime', { min: 10, max: 30, getAsString: true });
|
|
|
274
276
|
// "11, 13, 17, 19, 23, 29"
|
|
275
277
|
```
|
|
276
278
|
|
|
277
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/number/getNumbersInRange)
|
|
279
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/number/getNumbersInRange)
|
|
278
280
|
|
|
279
281
|
**`calculatePercentage`** - Swiss Army knife for percentage calculations with 7 specialized modes
|
|
280
282
|
|
|
@@ -287,7 +289,7 @@ calculatePercentage({
|
|
|
287
289
|
}); // 50 (50% increase)
|
|
288
290
|
```
|
|
289
291
|
|
|
290
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/number/calculatePercentage)
|
|
292
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/number/calculatePercentage)
|
|
291
293
|
|
|
292
294
|
---
|
|
293
295
|
|
|
@@ -302,7 +304,7 @@ extractUpdatedFields(dbRecord, update);
|
|
|
302
304
|
// { meta: { views: 1 } }
|
|
303
305
|
```
|
|
304
306
|
|
|
305
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/object/extractUpdatedFields)
|
|
307
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/object/extractUpdatedFields)
|
|
306
308
|
|
|
307
309
|
---
|
|
308
310
|
|
|
@@ -324,7 +326,7 @@ Stylog.blue.bold.underline.log('I am Bold Underlined Blue!');
|
|
|
324
326
|
Stylog.magenta.italic.log({ data: 'value' }, true);
|
|
325
327
|
```
|
|
326
328
|
|
|
327
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/misc/stylog)
|
|
329
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/misc/stylog)
|
|
328
330
|
|
|
329
331
|
---
|
|
330
332
|
|
|
@@ -337,7 +339,7 @@ Stylog.magenta.italic.log({ data: 'value' }, true);
|
|
|
337
339
|
throttleAction(updateScrollPosition, 100);
|
|
338
340
|
```
|
|
339
341
|
|
|
340
|
-
[Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/misc/throttleAction)
|
|
342
|
+
[Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/misc/throttleAction)
|
|
341
343
|
|
|
342
344
|
**`debounceAction`** - Intelligent delay for expensive operations
|
|
343
345
|
|
|
@@ -346,9 +348,9 @@ throttleAction(updateScrollPosition, 100);
|
|
|
346
348
|
debounceAction(fetchResults, 300);
|
|
347
349
|
```
|
|
348
350
|
|
|
349
|
-
[Full Documentation →](https://toolbox.nazmul-nhb.dev/docs/utilities/misc/debounceAction)
|
|
351
|
+
[Full Documentation →](https://toolbox-x.nazmul-nhb.dev/docs/utilities/misc/debounceAction)
|
|
350
352
|
|
|
351
|
-
> These utilities represent just a portion of the comprehensive `toolbox-x`. Each is designed with production-grade reliability and developer experience in mind. Explore more in the [full documentation](https://toolbox.nazmul-nhb.dev). All the utilities and classes are categorized.
|
|
353
|
+
> These utilities represent just a portion of the comprehensive `toolbox-x`. Each is designed with production-grade reliability and developer experience in mind. Explore more in the [full documentation](https://toolbox-x.nazmul-nhb.dev). All the utilities and classes are categorized.
|
|
352
354
|
|
|
353
355
|
---
|
|
354
356
|
|
|
@@ -356,13 +358,13 @@ debounceAction(fetchResults, 300);
|
|
|
356
358
|
|
|
357
359
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
358
360
|
<a target="_blank" href="https://www.npmjs.com/package/chronos-date">
|
|
359
|
-
<img src="https://img.shields.io/badge/Chronos_Date-chronos
|
|
361
|
+
<img src="https://img.shields.io/badge/Chronos_Date-chronos--date-blue" alt="chronos-date" />
|
|
360
362
|
</a>
|
|
361
363
|
</div>
|
|
362
364
|
|
|
363
365
|
<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
|
|
364
366
|
<a target="_blank" href="https://www.npmjs.com/package/bn-calendar">
|
|
365
|
-
<img src="https://img.shields.io/badge/Bangla_Calendar-bn
|
|
367
|
+
<img src="https://img.shields.io/badge/Bangla_Calendar-bn--calendar-blue" alt="bn-calendar" />
|
|
366
368
|
</a>
|
|
367
369
|
</div>
|
|
368
370
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { $ as Maybe, V as Branded,
|
|
17
|
+
import { $ as Maybe, V as Branded, hr as Percent } from "./object-DISH9Klq.cjs";
|
|
18
18
|
import { t as CSS_COLORS } from "./css-colors-Dqz6Bfnp.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/types/colors.d.ts
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { $ as Maybe, V as Branded,
|
|
17
|
+
import { $ as Maybe, V as Branded, hr as Percent } from "./object-DISH9Klq.mjs";
|
|
18
18
|
import { t as CSS_COLORS } from "./css-colors-Dqz6Bfnp.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/types/colors.d.ts
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { s as CSSColor } from "./Color-
|
|
17
|
+
import { s as CSSColor } from "./Color-BRYMXYpf.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/stylog/constants.d.ts
|
|
20
20
|
/** Records of ANSI-16 colors with values */
|
|
@@ -88,7 +88,7 @@ type StylogChain = LogStyler & { [K in Styles]: StylogChain };
|
|
|
88
88
|
*
|
|
89
89
|
* @remarks
|
|
90
90
|
* - Allows chaining of style methods or initializing with predefined styles.
|
|
91
|
-
* - For fluent, chainable styling with zero configuration use {@link https://toolbox.nazmul-nhb.dev/docs/utilities/misc/stylog Stylog} (`LogStyler` chainable wrapper).
|
|
91
|
+
* - For fluent, chainable styling with zero configuration use {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/misc/stylog Stylog} (`LogStyler` chainable wrapper).
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* const styled = new LogStyler(['red', 'bold']);
|
|
@@ -185,7 +185,7 @@ declare class LogStyler {
|
|
|
185
185
|
* @remarks
|
|
186
186
|
* - This method is specifically designed for browser environments and returns a tuple containing the formatted string with `%c` placeholder and an array of CSS styles (`string[]`).
|
|
187
187
|
* - Use this when you need direct access to the CSS styling for custom browser output.
|
|
188
|
-
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler#toansiinput-stringify toANSI} method.
|
|
188
|
+
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler#toansiinput-stringify toANSI} method.
|
|
189
189
|
*
|
|
190
190
|
* @param input - Input to style before printing in the shell.
|
|
191
191
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -224,7 +224,7 @@ declare class LogStyler {
|
|
|
224
224
|
*
|
|
225
225
|
* @remarks
|
|
226
226
|
* - This method returns ANSI-formatted strings suitable for environments that support ANSI escape codes (terminals, modern browser consoles, etc.).
|
|
227
|
-
* - For unsupported browsers, consider using the {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler#loginput-stringify log} method to print directly or {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler#tocssinput-stringify toCSS} to get styled tuple `[format, cssList]` for Browser.
|
|
227
|
+
* - For unsupported browsers, consider using the {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler#loginput-stringify log} method to print directly or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler#tocssinput-stringify toCSS} to get styled tuple `[format, cssList]` for Browser.
|
|
228
228
|
*
|
|
229
229
|
* @param input - Input to style before printing in the shell.
|
|
230
230
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -493,7 +493,7 @@ declare class LogStyler {
|
|
|
493
493
|
* - In browsers, styles are applied using `CSS`; in `Node.js`, `ANSI` escape codes are used.
|
|
494
494
|
* - When multiple styles of the same category are chained, the last one wins.
|
|
495
495
|
* - Use `.log(value, stringify?)` to print; set `stringify` to `true` to serialize with `JSON.stringify`.
|
|
496
|
-
* - If you need custom reusable style configurations, use {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler Stylog} class.
|
|
496
|
+
* - If you need custom reusable style configurations, use {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler Stylog} class.
|
|
497
497
|
*
|
|
498
498
|
* @example
|
|
499
499
|
* // Simple color
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { s as CSSColor } from "./Color-
|
|
17
|
+
import { s as CSSColor } from "./Color-1GhgzLZY.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/stylog/constants.d.ts
|
|
20
20
|
/** Records of ANSI-16 colors with values */
|
|
@@ -88,7 +88,7 @@ type StylogChain = LogStyler & { [K in Styles]: StylogChain };
|
|
|
88
88
|
*
|
|
89
89
|
* @remarks
|
|
90
90
|
* - Allows chaining of style methods or initializing with predefined styles.
|
|
91
|
-
* - For fluent, chainable styling with zero configuration use {@link https://toolbox.nazmul-nhb.dev/docs/utilities/misc/stylog Stylog} (`LogStyler` chainable wrapper).
|
|
91
|
+
* - For fluent, chainable styling with zero configuration use {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/misc/stylog Stylog} (`LogStyler` chainable wrapper).
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* const styled = new LogStyler(['red', 'bold']);
|
|
@@ -185,7 +185,7 @@ declare class LogStyler {
|
|
|
185
185
|
* @remarks
|
|
186
186
|
* - This method is specifically designed for browser environments and returns a tuple containing the formatted string with `%c` placeholder and an array of CSS styles (`string[]`).
|
|
187
187
|
* - Use this when you need direct access to the CSS styling for custom browser output.
|
|
188
|
-
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler#toansiinput-stringify toANSI} method.
|
|
188
|
+
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler#toansiinput-stringify toANSI} method.
|
|
189
189
|
*
|
|
190
190
|
* @param input - Input to style before printing in the shell.
|
|
191
191
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -224,7 +224,7 @@ declare class LogStyler {
|
|
|
224
224
|
*
|
|
225
225
|
* @remarks
|
|
226
226
|
* - This method returns ANSI-formatted strings suitable for environments that support ANSI escape codes (terminals, modern browser consoles, etc.).
|
|
227
|
-
* - For unsupported browsers, consider using the {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler#loginput-stringify log} method to print directly or {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler#tocssinput-stringify toCSS} to get styled tuple `[format, cssList]` for Browser.
|
|
227
|
+
* - For unsupported browsers, consider using the {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler#loginput-stringify log} method to print directly or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler#tocssinput-stringify toCSS} to get styled tuple `[format, cssList]` for Browser.
|
|
228
228
|
*
|
|
229
229
|
* @param input - Input to style before printing in the shell.
|
|
230
230
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -493,7 +493,7 @@ declare class LogStyler {
|
|
|
493
493
|
* - In browsers, styles are applied using `CSS`; in `Node.js`, `ANSI` escape codes are used.
|
|
494
494
|
* - When multiple styles of the same category are chained, the last one wins.
|
|
495
495
|
* - Use `.log(value, stringify?)` to print; set `stringify` to `true` to serialize with `JSON.stringify`.
|
|
496
|
-
* - If you need custom reusable style configurations, use {@link https://toolbox.nazmul-nhb.dev/docs/classes/LogStyler Stylog} class.
|
|
496
|
+
* - If you need custom reusable style configurations, use {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/LogStyler Stylog} class.
|
|
497
497
|
*
|
|
498
498
|
* @example
|
|
499
499
|
* // Simple color
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { E as NestedPrimitiveKey, nt as NormalPrimitiveKey, y as GenericObject } from "./object-
|
|
17
|
+
import { E as NestedPrimitiveKey, nt as NormalPrimitiveKey, y as GenericObject } from "./object-DISH9Klq.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/types/array.d.ts
|
|
20
20
|
/** * Flatten Array or Wrap in Array */
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { E as NestedPrimitiveKey, nt as NormalPrimitiveKey, y as GenericObject } from "./object-
|
|
17
|
+
import { E as NestedPrimitiveKey, nt as NormalPrimitiveKey, y as GenericObject } from "./object-DISH9Klq.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/types/array.d.ts
|
|
20
20
|
/** * Flatten Array or Wrap in Array */
|
|
@@ -37,8 +37,8 @@ function truncateString(str, maxLength) {
|
|
|
37
37
|
* @param options Configuration options for random ID generation.
|
|
38
38
|
* @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
|
|
39
39
|
*
|
|
40
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
41
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
40
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
41
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
44
|
* // Generate an ID with all default options
|
|
@@ -37,8 +37,8 @@ function truncateString(str, maxLength) {
|
|
|
37
37
|
* @param options Configuration options for random ID generation.
|
|
38
38
|
* @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
|
|
39
39
|
*
|
|
40
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
41
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
40
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
41
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
42
42
|
*
|
|
43
43
|
* @example
|
|
44
44
|
* // Generate an ID with all default options
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { F as RandomIdOptions } from "./string-
|
|
17
|
+
import { F as RandomIdOptions } from "./string-wxrxtKM0.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/string/basics.d.ts
|
|
20
20
|
/**
|
|
@@ -31,8 +31,8 @@ declare function truncateString(str: string, maxLength: number): string;
|
|
|
31
31
|
* @param options Configuration options for random ID generation.
|
|
32
32
|
* @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
|
|
33
33
|
*
|
|
34
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
35
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
34
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
35
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* // Generate an ID with all default options
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { F as RandomIdOptions } from "./string-
|
|
17
|
+
import { F as RandomIdOptions } from "./string-BKF5jssE.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/string/basics.d.ts
|
|
20
20
|
/**
|
|
@@ -31,8 +31,8 @@ declare function truncateString(str: string, maxLength: number): string;
|
|
|
31
31
|
* @param options Configuration options for random ID generation.
|
|
32
32
|
* @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
|
|
33
33
|
*
|
|
34
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
35
|
-
* @see {@link https://toolbox.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
34
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
35
|
+
* @see {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
38
|
* // Generate an ID with all default options
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { B as TitleCase, I as SentenceCase, L as SnakeCase, M as PascalSnakeCase, N as PathCase, T as DotCase, V as TrainCase, f as CamelCase, g as ConstantCase, j as PascalCase, k as KebabCase, m as CaseFormat, p as CapitalizeOptions, z as StringCaseOptions } from "./string-
|
|
17
|
+
import { B as TitleCase, I as SentenceCase, L as SnakeCase, M as PascalSnakeCase, N as PathCase, T as DotCase, V as TrainCase, f as CamelCase, g as ConstantCase, j as PascalCase, k as KebabCase, m as CaseFormat, p as CapitalizeOptions, z as StringCaseOptions } from "./string-wxrxtKM0.cjs";
|
|
18
18
|
|
|
19
19
|
//#region src/string/case.d.ts
|
|
20
20
|
/**
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { B as TitleCase, I as SentenceCase, L as SnakeCase, M as PascalSnakeCase, N as PathCase, T as DotCase, V as TrainCase, f as CamelCase, g as ConstantCase, j as PascalCase, k as KebabCase, m as CaseFormat, p as CapitalizeOptions, z as StringCaseOptions } from "./string-
|
|
17
|
+
import { B as TitleCase, I as SentenceCase, L as SnakeCase, M as PascalSnakeCase, N as PathCase, T as DotCase, V as TrainCase, f as CamelCase, g as ConstantCase, j as PascalCase, k as KebabCase, m as CaseFormat, p as CapitalizeOptions, z as StringCaseOptions } from "./string-BKF5jssE.mjs";
|
|
18
18
|
|
|
19
19
|
//#region src/string/case.d.ts
|
|
20
20
|
/**
|
package/dist/change-case.d.cts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-
|
|
17
|
+
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-BOBkUEwA.cjs";
|
|
18
18
|
export { capitalizeString, convertStringCase, toCamelCase, toConstantCase, toDotCase, toKebabCase, toPascalCase, toPascalSnakeCase, toPathCase, toSentenceCase, toSnakeCase, toTitleCase, toTrainCase };
|
package/dist/change-case.d.mts
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-
|
|
17
|
+
import { a as toDotCase, c as toPascalSnakeCase, d as toSnakeCase, f as toTitleCase, i as toConstantCase, l as toPathCase, n as convertStringCase, o as toKebabCase, p as toTrainCase, r as toCamelCase, s as toPascalCase, t as capitalizeString, u as toSentenceCase } from "./case-C7a3Pq8F.mjs";
|
|
18
18
|
export { capitalizeString, convertStringCase, toCamelCase, toConstantCase, toDotCase, toKebabCase, toPascalCase, toPascalSnakeCase, toPathCase, toSentenceCase, toSnakeCase, toTitleCase, toTrainCase };
|
package/dist/colors.d.cts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import { C as RandomColorOptions, E as SolidValues, S as RandomColor, _ as Hex, a as AlphaValues, b as RGB, g as HSLA, h as HSL, l as ColorInputArray, n as $ColorType, t as Color, v as Hex6, w as RandomHexRGB, x as RGBA, y as Hex8 } from "./Color-
|
|
17
|
+
import { hr as Percent } from "./object-DISH9Klq.cjs";
|
|
18
|
+
import { C as RandomColorOptions, E as SolidValues, S as RandomColor, _ as Hex, a as AlphaValues, b as RGB, g as HSLA, h as HSL, l as ColorInputArray, n as $ColorType, t as Color, v as Hex6, w as RandomHexRGB, x as RGBA, y as Hex8 } from "./Color-1GhgzLZY.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/colors/convert.d.ts
|
|
21
21
|
/**
|
package/dist/colors.d.mts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
import { C as RandomColorOptions, E as SolidValues, S as RandomColor, _ as Hex, a as AlphaValues, b as RGB, g as HSLA, h as HSL, l as ColorInputArray, n as $ColorType, t as Color, v as Hex6, w as RandomHexRGB, x as RGBA, y as Hex8 } from "./Color-
|
|
17
|
+
import { hr as Percent } from "./object-DISH9Klq.mjs";
|
|
18
|
+
import { C as RandomColorOptions, E as SolidValues, S as RandomColor, _ as Hex, a as AlphaValues, b as RGB, g as HSLA, h as HSL, l as ColorInputArray, n as $ColorType, t as Color, v as Hex6, w as RandomHexRGB, x as RGBA, y as Hex8 } from "./Color-BRYMXYpf.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/colors/convert.d.ts
|
|
21
21
|
/**
|
package/dist/constants.d.cts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { t as LOWERCASE } from "./constants-C7wERz5m.cjs";
|
|
18
|
-
import {
|
|
18
|
+
import { Ai as CURRENCY_LOCALES, Bi as DAYS, Fi as NATIVE_TZ_IDS, Hi as VEDIC_ZODIAC_SIGNS, Ii as TIME_ZONES, Li as TIME_ZONES_NATIVE, Mi as LOCALE_CODES, Ni as UNITS$1, Pi as IANA_TZ_IDS, Ri as TIME_ZONE_IDS, Ui as WESTERN_ZODIAC_SIGNS, Vi as MONTHS, Wi as COUNTRIES, ji as FRANKFURTER_CURRENCIES, ki as CURRENCY_CODES, zi as TIME_ZONE_LABELS } from "./object-DISH9Klq.cjs";
|
|
19
19
|
import { t as CSS_COLORS } from "./css-colors-Dqz6Bfnp.cjs";
|
|
20
20
|
import { t as UNITS } from "./constants-D8RzBjsL.cjs";
|
|
21
21
|
import { t as HTTP_STATUS_CODES } from "./constants-DNIXgBkz.cjs";
|
package/dist/constants.d.mts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { t as LOWERCASE } from "./constants-C7wERz5m.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { Ai as CURRENCY_LOCALES, Bi as DAYS, Fi as NATIVE_TZ_IDS, Hi as VEDIC_ZODIAC_SIGNS, Ii as TIME_ZONES, Li as TIME_ZONES_NATIVE, Mi as LOCALE_CODES, Ni as UNITS$1, Pi as IANA_TZ_IDS, Ri as TIME_ZONE_IDS, Ui as WESTERN_ZODIAC_SIGNS, Vi as MONTHS, Wi as COUNTRIES, ji as FRANKFURTER_CURRENCIES, ki as CURRENCY_CODES, zi as TIME_ZONE_LABELS } from "./object-DISH9Klq.mjs";
|
|
19
19
|
import { t as CSS_COLORS } from "./css-colors-Dqz6Bfnp.mjs";
|
|
20
20
|
import { t as UNITS } from "./constants-D8RzBjsL.mjs";
|
|
21
21
|
import { t as HTTP_STATUS_CODES } from "./constants-DNIXgBkz.mjs";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { d as isString, m as isUndefined } from "./primitives-Djsevc69.mjs";
|
|
18
18
|
import { a as normalizeNumber } from "./utilities-B9axOvOX.mjs";
|
|
19
|
-
import { n as trimString } from "./basics-
|
|
19
|
+
import { n as trimString } from "./basics-DQe9mP_M.mjs";
|
|
20
20
|
|
|
21
21
|
//#region src/number/guards.ts
|
|
22
22
|
/**
|
|
@@ -153,7 +153,7 @@ function extractURLs(str) {
|
|
|
153
153
|
/**
|
|
154
154
|
* * Returns a grammatically correct unit string, optionally prefixed with the number.
|
|
155
155
|
*
|
|
156
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
156
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
157
157
|
*
|
|
158
158
|
* @param count The numeric value to determine singular or plural.
|
|
159
159
|
* @param unit The unit name (e.g., "day", "hour").
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
const require_primitives = require('./primitives-CBGICrDR.cjs');
|
|
18
18
|
const require_utilities = require('./utilities-CzyXCRHM.cjs');
|
|
19
|
-
const require_basics = require('./basics-
|
|
19
|
+
const require_basics = require('./basics-CYqqguZr.cjs');
|
|
20
20
|
|
|
21
21
|
//#region src/number/guards.ts
|
|
22
22
|
/**
|
|
@@ -153,7 +153,7 @@ function extractURLs(str) {
|
|
|
153
153
|
/**
|
|
154
154
|
* * Returns a grammatically correct unit string, optionally prefixed with the number.
|
|
155
155
|
*
|
|
156
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
156
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
157
157
|
*
|
|
158
158
|
* @param count The numeric value to determine singular or plural.
|
|
159
159
|
* @param unit The unit name (e.g., "day", "hour").
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { Zr as LooseLiteral, ei as Mutable, i as $Record, it as Numeric } from "./object-DISH9Klq.mjs";
|
|
18
18
|
import { t as UNITS } from "./constants-D8RzBjsL.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/converter/base.d.ts
|
|
@@ -65,7 +65,7 @@ declare class $BaseConverter<Unit extends $Unit> {
|
|
|
65
65
|
*
|
|
66
66
|
* @remarks
|
|
67
67
|
* - This method is automatically called when the instance is used in a string context.
|
|
68
|
-
* - For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
68
|
+
* - For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
69
69
|
*/
|
|
70
70
|
toString(): string;
|
|
71
71
|
/**
|
|
@@ -120,7 +120,7 @@ declare class $BaseConverter<Unit extends $Unit> {
|
|
|
120
120
|
* @param decimals Number of decimal places for fractional value.
|
|
121
121
|
* @returns Formatted string with proper unit pluralization.
|
|
122
122
|
*
|
|
123
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
123
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
124
124
|
*/
|
|
125
125
|
format(decimals?: number): string;
|
|
126
126
|
/**
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import {
|
|
17
|
+
import { Zr as LooseLiteral, ei as Mutable, i as $Record, it as Numeric } from "./object-DISH9Klq.cjs";
|
|
18
18
|
import { t as UNITS } from "./constants-D8RzBjsL.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/converter/base.d.ts
|
|
@@ -65,7 +65,7 @@ declare class $BaseConverter<Unit extends $Unit> {
|
|
|
65
65
|
*
|
|
66
66
|
* @remarks
|
|
67
67
|
* - This method is automatically called when the instance is used in a string context.
|
|
68
|
-
* - For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
68
|
+
* - For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
69
69
|
*/
|
|
70
70
|
toString(): string;
|
|
71
71
|
/**
|
|
@@ -120,7 +120,7 @@ declare class $BaseConverter<Unit extends $Unit> {
|
|
|
120
120
|
* @param decimals Number of decimal places for fractional value.
|
|
121
121
|
* @returns Formatted string with proper unit pluralization.
|
|
122
122
|
*
|
|
123
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
123
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
124
124
|
*/
|
|
125
125
|
format(decimals?: number): string;
|
|
126
126
|
/**
|
package/dist/converter.cjs
CHANGED
|
@@ -97,7 +97,7 @@ var $BaseConverter = class {
|
|
|
97
97
|
*
|
|
98
98
|
* @remarks
|
|
99
99
|
* - This method is automatically called when the instance is used in a string context.
|
|
100
|
-
* - For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
100
|
+
* - For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
101
101
|
*/
|
|
102
102
|
toString() {
|
|
103
103
|
return this.$withPluralUnit();
|
|
@@ -177,7 +177,7 @@ var $BaseConverter = class {
|
|
|
177
177
|
* @param decimals Number of decimal places for fractional value.
|
|
178
178
|
* @returns Formatted string with proper unit pluralization.
|
|
179
179
|
*
|
|
180
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
180
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox-x.nazmul-nhb.dev/docs/utilities/string/pluralizer pluralizer} or {@link https://toolbox-x.nazmul-nhb.dev/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
181
181
|
*/
|
|
182
182
|
format(decimals = 2) {
|
|
183
183
|
return this.$withPluralUnit(this.$round(this.value, decimals));
|
package/dist/converter.d.cts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { it as Numeric } from "./object-
|
|
18
|
-
import { C as $Data, S as $Length, b as $Temperature, d as Converted, s as $Unit, v as $Volume, w as $Area, x as $Mass, y as $Time } from "./converter-
|
|
17
|
+
import { it as Numeric } from "./object-DISH9Klq.cjs";
|
|
18
|
+
import { C as $Data, S as $Length, b as $Temperature, d as Converted, s as $Unit, v as $Volume, w as $Area, x as $Mass, y as $Time } from "./converter-DywQ-FiS.cjs";
|
|
19
19
|
|
|
20
20
|
//#region src/converter/Converter.d.ts
|
|
21
21
|
/**
|
package/dist/converter.d.mts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { it as Numeric } from "./object-
|
|
18
|
-
import { C as $Data, S as $Length, b as $Temperature, d as Converted, s as $Unit, v as $Volume, w as $Area, x as $Mass, y as $Time } from "./converter-
|
|
17
|
+
import { it as Numeric } from "./object-DISH9Klq.mjs";
|
|
18
|
+
import { C as $Data, S as $Length, b as $Temperature, d as Converted, s as $Unit, v as $Volume, w as $Area, x as $Mass, y as $Time } from "./converter-BpP-vO_5.mjs";
|
|
19
19
|
|
|
20
20
|
//#region src/converter/Converter.d.ts
|
|
21
21
|
/**
|