nhb-toolbox 4.31.4 → 4.31.5
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/CHANGELOG.md +1 -1
- package/README.md +25 -25
- package/dist/dts/converter/base.d.ts +2 -2
- package/dist/dts/date/Chronos.d.ts +13 -13
- package/dist/dts/date/chronos-statics.d.ts +2 -2
- package/dist/dts/date/plugins/dateRangePlugin.d.ts +2 -2
- package/dist/dts/date/plugins/greetingPlugin.d.ts +2 -2
- package/dist/dts/date/plugins/seasonPlugin.d.ts +1 -1
- package/dist/dts/date/plugins/zodiacPlugin.d.ts +1 -1
- package/dist/dts/date/types.d.ts +2 -2
- package/dist/dts/date/utils.d.ts +2 -2
- package/dist/dts/hash/core.d.ts +3 -3
- package/dist/dts/hash/uuid.d.ts +1 -1
- package/dist/dts/http-status/HttpStatus.d.ts +3 -3
- package/dist/dts/object/types.d.ts +1 -1
- package/dist/dts/pluralizer/Pluralizer.d.ts +4 -4
- package/dist/dts/string/basics.d.ts +2 -2
- package/dist/dts/string/convert.d.ts +1 -1
- package/dist/dts/stylog/Stylog.d.ts +4 -4
- package/dist/dts/utils/index.d.ts +2 -2
- package/dist/dts/verbalizer/Verbalizer.d.ts +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -607,7 +607,7 @@ All notable changes to the package will be documented here.
|
|
|
607
607
|
|
|
608
608
|
## [4.20.48] - 2025-09-22
|
|
609
609
|
|
|
610
|
-
- **Wrapped** `ChronosMethods` type in `LooseLiteral` to allow passing *custom method names* without *type errors* when creating a custom [`Chronos Plugin`](https://toolbox.
|
|
610
|
+
- **Wrapped** `ChronosMethods` type in `LooseLiteral` to allow passing *custom method names* without *type errors* when creating a custom [`Chronos Plugin`](https://nhb-toolbox.vercel.app/docs/classes/Chronos/plugins#%EF%B8%8F-writing-your-own-custom-plugin).
|
|
611
611
|
- **Updated** *error message* in `convert` method in `Currency` class.
|
|
612
612
|
|
|
613
613
|
## [4.20.46] - 2025-09-22
|
package/README.md
CHANGED
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
>It will not receive any new features, only critical bug fixes will be provided in the future updates.
|
|
51
51
|
>
|
|
52
52
|
>The new packages are:
|
|
53
|
-
> <a target="_blank" href="https://toolbox-x.
|
|
54
|
-
> <a target="_blank" href="https://chronos
|
|
55
|
-
> <a target="_blank" href="https://
|
|
53
|
+
> <a target="_blank" href="https://toolbox-x.vercel.app"> <img src="https://img.shields.io/badge/Toolbox--X-toolbox--x-steelblue" alt="toolbox-x" /> </a>
|
|
54
|
+
> <a target="_blank" href="https://chronos-date.vercel.app"> <img src="https://img.shields.io/badge/Chronos--Date-chronos--date-teal" alt="chronos-date" /> </a>
|
|
55
|
+
> <a target="_blank" href="https://bn-calendar.vercel.app"> <img src="https://img.shields.io/badge/Bangla_Calendar-bn--calendar-red" alt="bn-calendar" /> </a>
|
|
56
56
|
|
|
57
57
|
## JavaScript/TypeScript Utility Library
|
|
58
58
|
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
- **Validation Utilities**: Robust data validation patterns
|
|
64
64
|
- **Zero Dependencies**: Framework-agnostic implementation using only native TS/JS with 0 external package
|
|
65
65
|
|
|
66
|
-
> [Explore Full Documentation →](https://toolbox.
|
|
66
|
+
> [Explore Full Documentation →](https://nhb-toolbox.vercel.app/)
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
@@ -97,7 +97,7 @@ See [Changelog](CHANGELOG.md) for recent updates.
|
|
|
97
97
|
- **Modular Design**: Tree-shaking friendly – import only what you need with zero bloat
|
|
98
98
|
- **Zero Dependencies**: No external dependencies - works with any JS/TS framework
|
|
99
99
|
- **IDE Support**: Full type hints with JSDoc-powered API references in your editor
|
|
100
|
-
- **Comprehensive Documentation**: Learn with real-world use cases on [documentation site](https://toolbox.
|
|
100
|
+
- **Comprehensive Documentation**: Learn with real-world use cases on [documentation site](https://nhb-toolbox.vercel.app/)
|
|
101
101
|
- **Battle-Tested**: Reliable utilities refined through real-world production use
|
|
102
102
|
- **Optimized for Production**: Focused on clean, efficient implementations
|
|
103
103
|
|
|
@@ -109,7 +109,7 @@ See [Changelog](CHANGELOG.md) for recent updates.
|
|
|
109
109
|
|
|
110
110
|
**`Chronos`** - The ultimate date/time manipulation class with 100+ methods for parsing, formatting, calculating, and comparing dates. Handles all edge cases and timezones safely.
|
|
111
111
|
|
|
112
|
-
> 🧩 **Note**: Some methods in `Chronos` are available only through the [**plugin system**](https://toolbox.
|
|
112
|
+
> 🧩 **Note**: Some methods in `Chronos` are available only through the [**plugin system**](https://nhb-toolbox.vercel.app/docs/classes/Chronos/plugins#-official-plugins). This modular design ensures the core bundle stays lightweight — plugins are loaded only when needed, reducing unnecessary code in your final build.
|
|
113
113
|
|
|
114
114
|
```typescript
|
|
115
115
|
new Chronos('2025-01-01').addDays(3).format('YYYY-MM-DD'); // "2025-01-04"
|
|
@@ -117,7 +117,7 @@ new Chronos('2025-01-01').addDays(3).format('YYYY-MM-DD'); // "2025-01-04"
|
|
|
117
117
|
chronos('2025-01-01').addDays(3).format('YYYY-MM-DD'); // "2025-01-04"
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
[Documentation →](https://toolbox.
|
|
120
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/classes/Chronos)
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -148,7 +148,7 @@ const date4 = new BanglaCalendar('১৪৩০', '১', '১');
|
|
|
148
148
|
const date5 = new BanglaCalendar('১৪৩০', '১', '১', { variant: 'revised-1966' });
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
[Documentation →](https://toolbox.
|
|
151
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/classes/BanglaCalendar)
|
|
152
152
|
|
|
153
153
|
---
|
|
154
154
|
|
|
@@ -162,7 +162,7 @@ const darkerBlue = blue.applyDarkness(20); // 20% darker
|
|
|
162
162
|
console.log(darkerBlue.hsl); // "hsl(240, 100%, 40%)" (was 50%)
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
[Documentation →](https://toolbox.
|
|
165
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/classes/Color)
|
|
166
166
|
|
|
167
167
|
---
|
|
168
168
|
|
|
@@ -179,7 +179,7 @@ const laptop = productFinder.findOne('laptop', 'category', {
|
|
|
179
179
|
});
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
[Documentation →](https://toolbox.
|
|
182
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/classes/Finder)
|
|
183
183
|
|
|
184
184
|
---
|
|
185
185
|
|
|
@@ -196,7 +196,7 @@ generateRandomID({
|
|
|
196
196
|
}); // "USER-171234567890-AB3C4D5E6F7G"
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
[Documentation →](https://toolbox.
|
|
199
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/string/generateRandomID)
|
|
200
200
|
|
|
201
201
|
---
|
|
202
202
|
|
|
@@ -219,7 +219,7 @@ pluralizer.isSingular('child'); // true
|
|
|
219
219
|
pluralizer.isPlural('fish'); // true (uncountable)
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
[Documentation →](https://toolbox.
|
|
222
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/string/pluralizer)
|
|
223
223
|
|
|
224
224
|
---
|
|
225
225
|
|
|
@@ -235,7 +235,7 @@ getColorForInitial(['Alice', 'Bob', 'Charlie']);
|
|
|
235
235
|
getColorForInitial('Banana', 50); // '#00376E80' (50% opacity)
|
|
236
236
|
```
|
|
237
237
|
|
|
238
|
-
[Documentation →](https://toolbox.
|
|
238
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/color/getColorForInitial)
|
|
239
239
|
|
|
240
240
|
---
|
|
241
241
|
|
|
@@ -270,7 +270,7 @@ const formData = createFormData(data, {
|
|
|
270
270
|
// files[1]=[File2]
|
|
271
271
|
```
|
|
272
272
|
|
|
273
|
-
[Documentation →](https://toolbox.
|
|
273
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/form/createFormData)
|
|
274
274
|
|
|
275
275
|
---
|
|
276
276
|
|
|
@@ -294,7 +294,7 @@ sanitizeData(user, { ignoreFalsy: true, ignoreEmpty: true }, 'partial');
|
|
|
294
294
|
// Returns { name: "John Doe", address: { city: "NYC" } }
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
[Documentation →](https://toolbox.
|
|
297
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/object/sanitizeData)
|
|
298
298
|
|
|
299
299
|
---
|
|
300
300
|
|
|
@@ -306,7 +306,7 @@ sanitizeData(user, { ignoreFalsy: true, ignoreEmpty: true }, 'partial');
|
|
|
306
306
|
parseJSON('{"value":"42"}'); // { value: 42 } (auto-converts numbers)
|
|
307
307
|
```
|
|
308
308
|
|
|
309
|
-
[Documentation →](https://toolbox.
|
|
309
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/misc/parseJSON)
|
|
310
310
|
|
|
311
311
|
---
|
|
312
312
|
|
|
@@ -318,7 +318,7 @@ parseJSON('{"value":"42"}'); // { value: 42 } (auto-converts numbers)
|
|
|
318
318
|
numberToWords(125); // "one hundred twenty-five"
|
|
319
319
|
```
|
|
320
320
|
|
|
321
|
-
[Documentation →](https://toolbox.
|
|
321
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/number/numberToWords)
|
|
322
322
|
|
|
323
323
|
---
|
|
324
324
|
|
|
@@ -332,7 +332,7 @@ getNumbersInRange('prime', { min: 10, max: 30, getAsString: true });
|
|
|
332
332
|
// "11, 13, 17, 19, 23, 29"
|
|
333
333
|
```
|
|
334
334
|
|
|
335
|
-
[Documentation →](https://toolbox.
|
|
335
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/number/getNumbersInRange)
|
|
336
336
|
|
|
337
337
|
**`calculatePercentage`** - Swiss Army knife for percentage calculations with 7 specialized modes
|
|
338
338
|
|
|
@@ -345,7 +345,7 @@ calculatePercentage({
|
|
|
345
345
|
}); // 50 (50% increase)
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
[Documentation →](https://toolbox.
|
|
348
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/number/calculatePercentage)
|
|
349
349
|
|
|
350
350
|
---
|
|
351
351
|
|
|
@@ -360,7 +360,7 @@ extractUpdatedFields(dbRecord, update);
|
|
|
360
360
|
// { meta: { views: 1 } }
|
|
361
361
|
```
|
|
362
362
|
|
|
363
|
-
[Documentation →](https://toolbox.
|
|
363
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/object/extractUpdatedFields)
|
|
364
364
|
|
|
365
365
|
---
|
|
366
366
|
|
|
@@ -382,7 +382,7 @@ Stylog.blue.bold.underline.log('I am Bold Underlined Blue!');
|
|
|
382
382
|
Stylog.magenta.italic.log({ data: 'value' }, true);
|
|
383
383
|
```
|
|
384
384
|
|
|
385
|
-
[Documentation →](https://toolbox.
|
|
385
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/misc/stylog)
|
|
386
386
|
|
|
387
387
|
---
|
|
388
388
|
|
|
@@ -395,7 +395,7 @@ Stylog.magenta.italic.log({ data: 'value' }, true);
|
|
|
395
395
|
throttleAction(updateScrollPosition, 100);
|
|
396
396
|
```
|
|
397
397
|
|
|
398
|
-
[Documentation →](https://toolbox.
|
|
398
|
+
[Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/misc/throttleAction)
|
|
399
399
|
|
|
400
400
|
**`debounceAction`** - Intelligent delay for expensive operations
|
|
401
401
|
|
|
@@ -404,9 +404,9 @@ throttleAction(updateScrollPosition, 100);
|
|
|
404
404
|
debounceAction(fetchResults, 300);
|
|
405
405
|
```
|
|
406
406
|
|
|
407
|
-
[Full Documentation →](https://toolbox.
|
|
407
|
+
[Full Documentation →](https://nhb-toolbox.vercel.app/docs/utilities/misc/debounceAction)
|
|
408
408
|
|
|
409
|
-
> These utilities represent just a portion of the comprehensive `nhb-toolbox`. Each is designed with production-grade reliability and developer experience in mind. Explore more in the [full documentation](https://toolbox.
|
|
409
|
+
> These utilities represent just a portion of the comprehensive `nhb-toolbox`. Each is designed with production-grade reliability and developer experience in mind. Explore more in the [full documentation](https://nhb-toolbox.vercel.app). All the utilities and classes are categorized.
|
|
410
410
|
|
|
411
411
|
---
|
|
412
412
|
|
|
@@ -474,4 +474,4 @@ You are free to use, modify, and distribute this project under the terms of the
|
|
|
474
474
|
|
|
475
475
|
---
|
|
476
476
|
|
|
477
|
-
Built with ❤️ by [**Nazmul Hassan**](https://nazmul-nhb.
|
|
477
|
+
Built with ❤️ by [**Nazmul Hassan**](https://nazmul-nhb.vercel.app)
|
|
@@ -47,7 +47,7 @@ export declare class $BaseConverter<Unit extends $Unit> {
|
|
|
47
47
|
*
|
|
48
48
|
* @remarks
|
|
49
49
|
* - This method is automatically called when the instance is used in a string context.
|
|
50
|
-
* - For complex and versatile pluralization, please refer to {@link https://toolbox.
|
|
50
|
+
* - For complex and versatile pluralization, please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/pluralizer pluralizer} or {@link https://nhb-toolbox.vercel.app/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
51
51
|
*/
|
|
52
52
|
toString(): string;
|
|
53
53
|
/**
|
|
@@ -102,7 +102,7 @@ export declare class $BaseConverter<Unit extends $Unit> {
|
|
|
102
102
|
* @param decimals Number of decimal places for fractional value.
|
|
103
103
|
* @returns Formatted string with proper unit pluralization.
|
|
104
104
|
*
|
|
105
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.
|
|
105
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/pluralizer pluralizer} or {@link https://nhb-toolbox.vercel.app/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
106
106
|
*/
|
|
107
107
|
format(decimals?: number): string;
|
|
108
108
|
/**
|
|
@@ -48,24 +48,24 @@ export declare class Chronos {
|
|
|
48
48
|
* Represents the current timezone name (e.g., `"Bangladesh Standard Time"`), or falls back to the corresponding timezone identifier (e.g., `"Asia/Dhaka"`) if no name can be resolved.
|
|
49
49
|
*
|
|
50
50
|
* @remarks
|
|
51
|
-
* - Invoking the {@link https://toolbox.
|
|
51
|
+
* - Invoking the {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone} method sets the timezone name that corresponds to the specified UTC offset, or the UTC offset itself if no name exists. For more details on this behavior, see {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/names#gettimezonename getTimeZoneName}.
|
|
52
52
|
* - To retrieve the local system's native timezone name (or its identifier if the name is unavailable), use the {@link $getNativeTimeZoneName} instance method.
|
|
53
53
|
*/
|
|
54
54
|
timeZoneName: LooseLiteral<TimeZoneName>;
|
|
55
55
|
/**
|
|
56
56
|
* Represents the current timezone context, which can be a single identifier, an array of equivalent identifiers, or a UTC offset.
|
|
57
57
|
*
|
|
58
|
-
* - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://toolbox.
|
|
58
|
+
* - **{@link $TimeZoneIdentifier}** — e.g., `"Asia/Dhaka"`. Returned when the {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone} method has not been invoked. It is default behavior.
|
|
59
59
|
* - **Array of {@link $TimeZoneIdentifier}** — e.g., `[ 'Asia/Calcutta', 'Asia/Colombo' ]`, used when multiple timezones share the same UTC offset such as `"UTC+05:30"`.
|
|
60
60
|
* - **{@link UTCOffset}** — e.g., `"UTC+06:45"` or `"UTC+02:15"`, returned when no named timezone corresponds to a given offset.
|
|
61
61
|
*
|
|
62
62
|
* @remarks
|
|
63
|
-
* - By default, when {@link https://toolbox.
|
|
63
|
+
* - By default, when {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone} is not applied, a single {@link $TimeZoneIdentifier} string is provided.
|
|
64
64
|
* - When applied, it may instead return a single identifier string, an array of equivalent identifiers or a UTC offset string.
|
|
65
65
|
* - To retrieve the local system's native timezone identifier, use the {@link $getNativeTimeZoneId} instance method.
|
|
66
66
|
*/
|
|
67
67
|
timeZoneId: TimeZoneId;
|
|
68
|
-
/** Tracker to identify the instance created by {@link https://toolbox.
|
|
68
|
+
/** Tracker to identify the instance created by {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone} method */
|
|
69
69
|
protected $tzTracker?: $TimeZoneIdentifier | TimeZone | UTCOffset;
|
|
70
70
|
/**
|
|
71
71
|
* * Creates a new immutable `Chronos` instance from current date & time (UTC).
|
|
@@ -150,7 +150,7 @@ export declare class Chronos {
|
|
|
150
150
|
*
|
|
151
151
|
* @remarks
|
|
152
152
|
* - This method always reflects the local machine's time zone if `tzId` is parameter is omitted.
|
|
153
|
-
* - {@link https://toolbox.
|
|
153
|
+
* - {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
|
|
154
154
|
* - To access the time zone name of a modified or converted instance, use the {@link timeZoneName} public property instead.
|
|
155
155
|
*
|
|
156
156
|
* @param tzId Optional time zone identifier to get time zone name for that specific identifier if available.
|
|
@@ -163,7 +163,7 @@ export declare class Chronos {
|
|
|
163
163
|
*
|
|
164
164
|
* @remarks
|
|
165
165
|
* - This method always returns the identifier of the local machine's time zone.
|
|
166
|
-
* - {@link https://toolbox.
|
|
166
|
+
* - {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone}, {@link utc}, or {@link toUTC} methods have no effects on this method.
|
|
167
167
|
* - To obtain the identifier(s) of a modified or converted instance, use the {@link timeZoneId} public property instead.
|
|
168
168
|
*
|
|
169
169
|
* @returns The local system's IANA time zone identifier.
|
|
@@ -231,7 +231,7 @@ export declare class Chronos {
|
|
|
231
231
|
*
|
|
232
232
|
* - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, `ZZ` and `Z`.
|
|
233
233
|
* - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
|
|
234
|
-
* - Please refer to {@link https://toolbox.
|
|
234
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/format#format-tokens format tokens} for details.
|
|
235
235
|
*
|
|
236
236
|
* @param useUTC - Optional boolean to format the date using UTC time.
|
|
237
237
|
* When `true`, it behaves like `formatUTC()` and outputs time based on UTC offset. Defaults to `false`.
|
|
@@ -247,7 +247,7 @@ export declare class Chronos {
|
|
|
247
247
|
*
|
|
248
248
|
* @param format - The desired format string. Defaults to `'dd, mmm DD, YYYY HH:mm:ss'`
|
|
249
249
|
* (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
250
|
-
* - Please refer to {@link https://toolbox.
|
|
250
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/format#format-tokens format tokens} for details.
|
|
251
251
|
*
|
|
252
252
|
* @param useUTC - If `true`, formats the date in UTC (equivalent to `formatUTC()`).
|
|
253
253
|
* Defaults to `false` (local time).
|
|
@@ -264,7 +264,7 @@ export declare class Chronos {
|
|
|
264
264
|
*
|
|
265
265
|
* - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, `ZZ` and `Z`.
|
|
266
266
|
* - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
|
|
267
|
-
* - Please refer to {@link https://toolbox.
|
|
267
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/format#format-tokens format tokens} for details.
|
|
268
268
|
*
|
|
269
269
|
* @returns Formatted date string in desired format (UTC time).
|
|
270
270
|
*/
|
|
@@ -660,7 +660,7 @@ export declare class Chronos {
|
|
|
660
660
|
* @param options - Relative range (e.g., 7 days, 4 weeks) and output format (local with timezone or utc).
|
|
661
661
|
* @returns Array of ISO date strings in the specified format. Returns empty array if no matches in the time span.
|
|
662
662
|
*
|
|
663
|
-
* - Please refer to {@link https://toolbox.
|
|
663
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/statics#getdatesforday docs} for details.
|
|
664
664
|
*
|
|
665
665
|
* @example
|
|
666
666
|
* Chronos.getDatesForDay('Wednesday', { span: 7, unit: 'day' });
|
|
@@ -682,7 +682,7 @@ export declare class Chronos {
|
|
|
682
682
|
* @param options - Date range (from/to, e.g. `'2025-06-30'`, ` new Date()`, `new Chronos()` etc.) and output format (local with timezone or utc).
|
|
683
683
|
* @returns Array of ISO date strings in the specified format. Returns empty array if no matches in the range.
|
|
684
684
|
*
|
|
685
|
-
* - Please refer to {@link https://toolbox.
|
|
685
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/statics#getdatesforday docs} for details.
|
|
686
686
|
*
|
|
687
687
|
* @remarks
|
|
688
688
|
* - When using `Chronos` instances for `from` and/or `to`, ensure both are created in the **same time zone** to avoid mismatched boundaries.
|
|
@@ -788,7 +788,7 @@ export declare class Chronos {
|
|
|
788
788
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using {@link register} method (alias `use` method).
|
|
789
789
|
*
|
|
790
790
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
791
|
-
* - See {@link https://toolbox.
|
|
791
|
+
* - See {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
792
792
|
*/
|
|
793
793
|
static use(plugin: ChronosPlugin): void;
|
|
794
794
|
/**
|
|
@@ -801,7 +801,7 @@ export declare class Chronos {
|
|
|
801
801
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using this (`register`) method over {@link use} method.
|
|
802
802
|
*
|
|
803
803
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
804
|
-
* - See {@link https://toolbox.
|
|
804
|
+
* - See {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
805
805
|
*/
|
|
806
806
|
static register(plugin: ChronosPlugin): void;
|
|
807
807
|
}
|
|
@@ -92,7 +92,7 @@ export interface ChronosStatics {
|
|
|
92
92
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using {@link register} method (alias `use` method).
|
|
93
93
|
*
|
|
94
94
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
95
|
-
* - See {@link https://toolbox.
|
|
95
|
+
* - See {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
96
96
|
*/
|
|
97
97
|
use(plugin: ChronosPlugin): void;
|
|
98
98
|
/**
|
|
@@ -105,7 +105,7 @@ export interface ChronosStatics {
|
|
|
105
105
|
* - To prevent this incorrect *linter error* in `React` projects, prefer using this (`register`) method over {@link use} method.
|
|
106
106
|
*
|
|
107
107
|
* - **NOTE:** *Once a plugin is injected, all the registered methods for that plugin will be available for the whole project.*
|
|
108
|
-
* - See {@link https://toolbox.
|
|
108
|
+
* - See {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/plugins#-official-plugins full list of plugins and the methods they register}.
|
|
109
109
|
*/
|
|
110
110
|
register(plugin: ChronosPlugin): void;
|
|
111
111
|
/**
|
|
@@ -11,7 +11,7 @@ declare module '../Chronos' {
|
|
|
11
11
|
* @param options - Configuration for the date range. Accepts a fixed (`RangeWithDates`) format.
|
|
12
12
|
* @returns Array of ISO date-time strings in either local or UTC format, excluding any skipped weekdays if specified.
|
|
13
13
|
*
|
|
14
|
-
* - Please refer to {@link https://toolbox.
|
|
14
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/calculation#getdatesinrange docs} for details.
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
* - When using `Chronos` instances for `from` and/or `to`, ensure both are created in the **same time zone** to avoid mismatched boundaries.
|
|
@@ -43,7 +43,7 @@ declare module '../Chronos' {
|
|
|
43
43
|
* @param options - Configuration for the date range. Accepts a relative (`RelativeDateRange`) format.
|
|
44
44
|
* @returns Array of ISO date-time strings in either local or UTC format, excluding any skipped weekdays if specified.
|
|
45
45
|
*
|
|
46
|
-
* - Please refer to {@link https://toolbox.
|
|
46
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/calculation#getdatesinrange docs} for details.
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
49
|
* // Using a relative date range with skipDays:
|
|
@@ -4,7 +4,7 @@ declare module '../Chronos' {
|
|
|
4
4
|
/**
|
|
5
5
|
* @instance Returns a greeting message based on current instance of `Chronos` time or provided time in the `configs`.
|
|
6
6
|
*
|
|
7
|
-
* @remarks This method internally uses {@link https://toolbox.
|
|
7
|
+
* @remarks This method internally uses {@link https://nhb-toolbox.vercel.app/docs/utilities/date/getGreeting getGreeting} function.
|
|
8
8
|
*
|
|
9
9
|
* @param configs - Configuration options for greeting times and messages.
|
|
10
10
|
* @returns The appropriate greeting message.
|
|
@@ -13,7 +13,7 @@ declare module '../Chronos' {
|
|
|
13
13
|
/**
|
|
14
14
|
* @instance Returns a greeting message based on current instance of `Chronos` time or provided time in the `configs`.
|
|
15
15
|
*
|
|
16
|
-
* @remarks This method is an alias for {@link https://toolbox.
|
|
16
|
+
* @remarks This method is an alias for {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/format#getgreeting getGreeting} method.
|
|
17
17
|
*
|
|
18
18
|
* @param configs - Configuration options for greeting times and messages.
|
|
19
19
|
* @returns The appropriate greeting message.
|
|
@@ -10,7 +10,7 @@ declare module '../Chronos' {
|
|
|
10
10
|
/**
|
|
11
11
|
* @instance Returns the current season name based on optional season rules or presets.
|
|
12
12
|
*
|
|
13
|
-
* @remarks This method is an alias for {@link https://toolbox.
|
|
13
|
+
* @remarks This method is an alias for {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/names#season season} method.
|
|
14
14
|
*
|
|
15
15
|
* @param options Configuration with optional custom seasons or preset name.
|
|
16
16
|
* @returns The name of the season the current date falls under.
|
|
@@ -9,7 +9,7 @@ declare module '../Chronos' {
|
|
|
9
9
|
getZodiacSign<Sign extends string = ZodiacSign>(options?: ZodiacOptions<Sign>): Sign;
|
|
10
10
|
/**
|
|
11
11
|
* @instance Returns the zodiac sign based on current date or `birthDate` option.
|
|
12
|
-
* @remarks This method is an alias for {@link https://toolbox.
|
|
12
|
+
* @remarks This method is an alias for {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/names#getzodiacsign getZodiacSign} method.
|
|
13
13
|
*
|
|
14
14
|
* @param options Optional config to choose preset or provide custom zodiac date ranges.
|
|
15
15
|
* @returns The matching zodiac sign from preset/custom list.
|
package/dist/dts/date/types.d.ts
CHANGED
|
@@ -192,7 +192,7 @@ export interface ChronosInternals {
|
|
|
192
192
|
* @param offset Optional UTC offset in `UTC±HH:mm` format.
|
|
193
193
|
* @param tzName Optional time zone name to set.
|
|
194
194
|
* @param tzId Optional time zone identifier(s) to set.
|
|
195
|
-
* @param tzTracker Optional tracker to identify the instance created by {@link https://toolbox.
|
|
195
|
+
* @param tzTracker Optional tracker to identify the instance created by {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/conversion#timezone timeZone} method.
|
|
196
196
|
* @returns The `Chronos` instance with the specified origin and other properties.
|
|
197
197
|
*/
|
|
198
198
|
withOrigin(instance: Chronos, method: PluginMethods, offset?: UTCOffset, tzName?: LooseLiteral<TimeZoneName>, tzId?: TimeZoneId, tzTracker?: $TimeZoneIdentifier | TimeZone | UTCOffset): Chronos;
|
|
@@ -327,7 +327,7 @@ export interface FormatOptions {
|
|
|
327
327
|
*
|
|
328
328
|
* - Supported format tokens include: `YYYY`, `YY`, `mmmm`, `mmm`, `MM`, `M`, `DD`, `D`, `dd`, `ddd`, `Do`, `HH`, `H`, `hh`, `h`, `mm`, `m`, `ss`, `s`, `ms`, `mss`, `a`, `A`, and `ZZ`.
|
|
329
329
|
* - *Any token not wrapped in brackets will be parsed and replaced with its corresponding date component.*
|
|
330
|
-
* - Please refer to {@link https://toolbox.
|
|
330
|
+
* - Please refer to {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos/format#format-tokens format tokens} for details.
|
|
331
331
|
*/
|
|
332
332
|
format?: string;
|
|
333
333
|
/** - Whether to use UTC time. Defaults to `false`. */
|
package/dist/dts/date/utils.d.ts
CHANGED
|
@@ -89,8 +89,8 @@ export declare function getTimeZoneIds(offset: UTCOffset): TimeZoneIdNative[];
|
|
|
89
89
|
* - The default format is `'dd, mmm DD, YYYY HH:mm:ss'` (e.g., `'Sun, Apr 06, 2025 16:11:55'`).
|
|
90
90
|
* - By default, local time is used; set `useUTC` to `true` to format in UTC.
|
|
91
91
|
* - The format string supports various tokens for date and time components, as well as literal text enclosed in square brackets.
|
|
92
|
-
* - See {@link https://toolbox.
|
|
93
|
-
* - For more complex date/time manipulations, consider using the {@link https://toolbox.
|
|
92
|
+
* - See {@link https://nhb-toolbox.vercel.app/docs/utilities/date/formatDate#format-tokens format tokens} for details on supported tokens.
|
|
93
|
+
* - For more complex date/time manipulations, consider using the {@link https://nhb-toolbox.vercel.app/docs/classes/Chronos Chronos} class.
|
|
94
94
|
*
|
|
95
95
|
* @returns Date/time string in specified format.
|
|
96
96
|
*/
|
package/dist/dts/hash/core.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ export declare function sha1(msg: string): string;
|
|
|
59
59
|
* // Returns: '7037e204b825b83553ba336a6ec35b796d505599286ae864729ed6cb33ae9fe1'
|
|
60
60
|
* ```
|
|
61
61
|
*
|
|
62
|
-
* @see {@link https://toolbox.
|
|
63
|
-
* @see {@link https://toolbox.
|
|
64
|
-
* @see {@link https://toolbox.
|
|
62
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/hash/encoding#sha256bytes sha256Bytes} for hashing raw bytes
|
|
63
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/hash/encoding#utf8tobytes utf8ToBytes} for converting string to bytes
|
|
64
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/hash/encoding#bytestohex bytesToHex} for converting bytes to a hexadecimal string
|
|
65
65
|
*/
|
|
66
66
|
export declare function sha256(msg: string): string;
|
package/dist/dts/hash/uuid.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import type { DecodedUUID, SupportedVersion, UUID, UUIDOptions } from './types';
|
|
|
44
44
|
* - `v7`: Millisecond precision; extremely high throughput may still cause rare collisions.
|
|
45
45
|
* - `v8`: Uses a simple timestamp + randomness layout; custom layouts are not supported here.
|
|
46
46
|
*
|
|
47
|
-
* - Use {@link https://toolbox.
|
|
47
|
+
* - Use {@link https://nhb-toolbox.vercel.app/docs/utilities/string/generateRandomID generateRandomID} for customized id generation or {@link https://nhb-toolbox.vercel.app/docs/utilities/hash/randomHex randomHex} for hex-only random string with custom length.
|
|
48
48
|
*/
|
|
49
49
|
export declare function uuid<V extends SupportedVersion = 'v4'>(options?: UUIDOptions<V>): UUID<V>;
|
|
50
50
|
/**
|
|
@@ -6,10 +6,10 @@ import type { HttpStatusCode, HttpStatusName, StatusCategory, StatusCode, Status
|
|
|
6
6
|
* @remarks
|
|
7
7
|
* - Supports lookup by code or name (both `SOME_NAME` and `Some Name` formats).
|
|
8
8
|
* - Allows adding custom codes and overriding messages for existing ones.
|
|
9
|
-
* - Provides pre-grouped categories for quick filtering (see {@link https://toolbox.
|
|
9
|
+
* - Provides pre-grouped categories for quick filtering (see {@link https://nhb-toolbox.vercel.app/docs/classes/HttpStatus#groups-static-property HttpStatus.Groups}).
|
|
10
10
|
* - Intended to be reusable — create multiple instances if you want separate registries.
|
|
11
11
|
*
|
|
12
|
-
* @see {@link https://toolbox.
|
|
12
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/misc/httpStatus httpStatus} for the default preloaded singleton instance.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* // Using the class directly
|
|
@@ -101,7 +101,7 @@ export declare class HttpStatus {
|
|
|
101
101
|
list(category?: StatusCategory): StatusEntry[];
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
|
-
* * Default singleton instance of {@link https://toolbox.
|
|
104
|
+
* * Default singleton instance of {@link https://nhb-toolbox.vercel.app/docs/classes/HttpStatus HttpStatus} class.
|
|
105
105
|
*
|
|
106
106
|
* @remarks
|
|
107
107
|
* - Preloaded with all MDN-based HTTP status codes.
|
|
@@ -10,7 +10,7 @@ export type Objects = readonly [GenericObject, ...GenericObject[]];
|
|
|
10
10
|
/**
|
|
11
11
|
* - Prettify all object properties into a readable form.
|
|
12
12
|
*
|
|
13
|
-
* @note It is recommended to use it only with `MergeAll<T>`, `FlattenValue<T>` and/or `FlattenLeafValue<T>`. For other other cases use {@link https://toolbox.
|
|
13
|
+
* @note It is recommended to use it only with `MergeAll<T>`, `FlattenValue<T>` and/or `FlattenLeafValue<T>`. For other other cases use {@link https://nhb-toolbox.vercel.app/docs/types/utility-types#prettifyt Prettify<T>}
|
|
14
14
|
*/
|
|
15
15
|
export type ExpandAll<T> = T extends AdvancedTypes ? T : T extends GenericObject ? {
|
|
16
16
|
[K in keyof T]: ExpandAll<T[K]>;
|
|
@@ -10,9 +10,9 @@ import type { PluralizeOptions } from './types';
|
|
|
10
10
|
* - This class is useful for applications that need to handle natural language processing, such as chatbots, content management systems, or any text processing tasks that require accurate pluralization.
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* - For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox.
|
|
13
|
+
* - For simpler pluralization (plural with only 's'), please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/formatUnitWithPlural formatUnitWithPlural} instead.
|
|
14
14
|
*
|
|
15
|
-
* - For ready to use instance, please refer to {@link https://toolbox.
|
|
15
|
+
* - For ready to use instance, please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/pluralizer pluralizer} instead.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* const pluralizer = new Pluralizer();
|
|
@@ -107,12 +107,12 @@ export declare class Pluralizer {
|
|
|
107
107
|
isSingular(word: string): boolean;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
* Default shared instance of {@link https://toolbox.
|
|
110
|
+
* Default shared instance of {@link https://nhb-toolbox.vercel.app/docs/classes/Pluralizer Pluralizer}.
|
|
111
111
|
*
|
|
112
112
|
* - _Use this when you don’t need multiple configurations._
|
|
113
113
|
* - _It comes preloaded with standard pluralization rules, irregular forms, and uncountable nouns._
|
|
114
114
|
*
|
|
115
|
-
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://toolbox.
|
|
115
|
+
* @remarks For simpler pluralization (plural with only 's'), please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/formatUnitWithPlural formatUnitWithPlural} instead.
|
|
116
116
|
*
|
|
117
117
|
* * Handles English word pluralization and singularization with support for irregular forms and uncountable nouns.
|
|
118
118
|
*
|
|
@@ -13,8 +13,8 @@ export declare function truncateString(str: string, maxLength: number): string;
|
|
|
13
13
|
* @param options Configuration options for random ID generation.
|
|
14
14
|
* @returns The generated ID string composed of the random alphanumeric string of specified length with optional `timeStamp`, `prefix`, and `suffix`, `caseOption` and `separator`.
|
|
15
15
|
*
|
|
16
|
-
* @see {@link https://toolbox.
|
|
17
|
-
* @see {@link https://toolbox.
|
|
16
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/hash/uuid uuid} for `uuid` generation
|
|
17
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/hash/randomHex randomHex} for random hexadecimal string generation
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* // Generate an ID with all default options
|
|
@@ -52,7 +52,7 @@ export declare function extractURLs(str: string): string[];
|
|
|
52
52
|
/**
|
|
53
53
|
* * Returns a grammatically correct unit string, optionally prefixed with the number.
|
|
54
54
|
*
|
|
55
|
-
* @remarks For complex and versatile pluralization, please refer to {@link https://toolbox.
|
|
55
|
+
* @remarks For complex and versatile pluralization, please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/pluralizer pluralizer} or {@link https://nhb-toolbox.vercel.app/docs/classes/Pluralizer Pluralizer Class} instead.
|
|
56
56
|
*
|
|
57
57
|
* @param count The numeric value to determine singular or plural.
|
|
58
58
|
* @param unit The unit name (e.g., "day", "hour").
|
|
@@ -63,7 +63,7 @@ export declare function isTextStyle(value: string): value is TextStyle;
|
|
|
63
63
|
*
|
|
64
64
|
* @remarks
|
|
65
65
|
* - Allows chaining of style methods or initializing with predefined styles.
|
|
66
|
-
* - For fluent, chainable styling with zero configuration use {@link https://toolbox.
|
|
66
|
+
* - For fluent, chainable styling with zero configuration use {@link https://nhb-toolbox.vercel.app/docs/utilities/misc/stylog Stylog} (`LogStyler` chainable wrapper).
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* const styled = new LogStyler(['red', 'bold']);
|
|
@@ -160,7 +160,7 @@ export declare class LogStyler {
|
|
|
160
160
|
* @remarks
|
|
161
161
|
* - 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[]`).
|
|
162
162
|
* - Use this when you need direct access to the CSS styling for custom browser output.
|
|
163
|
-
* - If you want to format with ANSI escape codes, consider using {@link https://toolbox.
|
|
163
|
+
* - If you want to format with ANSI escape codes, consider using {@link https://nhb-toolbox.vercel.app/docs/classes/LogStyler#toansiinput-stringify toANSI} method.
|
|
164
164
|
*
|
|
165
165
|
* @param input - Input to style before printing in the shell.
|
|
166
166
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -199,7 +199,7 @@ export declare class LogStyler {
|
|
|
199
199
|
*
|
|
200
200
|
* @remarks
|
|
201
201
|
* - This method returns ANSI-formatted strings suitable for environments that support ANSI escape codes (terminals, modern browser consoles, etc.).
|
|
202
|
-
* - For unsupported browsers, consider using the {@link https://toolbox.
|
|
202
|
+
* - For unsupported browsers, consider using the {@link https://nhb-toolbox.vercel.app/docs/classes/LogStyler#loginput-stringify log} method to print directly or {@link https://nhb-toolbox.vercel.app/docs/classes/LogStyler#tocssinput-stringify toCSS} to get styled tuple `[format, cssList]` for Browser.
|
|
203
203
|
*
|
|
204
204
|
* @param input - Input to style before printing in the shell.
|
|
205
205
|
* @param stringify - Whether to apply `JSON.stringify()` before styling. Defaults to `false`.
|
|
@@ -468,7 +468,7 @@ export declare class LogStyler {
|
|
|
468
468
|
* - In browsers, styles are applied using `CSS`; in `Node.js`, `ANSI` escape codes are used.
|
|
469
469
|
* - When multiple styles of the same category are chained, the last one wins.
|
|
470
470
|
* - Use `.log(value, stringify?)` to print; set `stringify` to `true` to serialize with `JSON.stringify`.
|
|
471
|
-
* - If you need custom reusable style configurations, use {@link https://toolbox.
|
|
471
|
+
* - If you need custom reusable style configurations, use {@link https://nhb-toolbox.vercel.app/docs/classes/LogStyler Stylog} class.
|
|
472
472
|
*
|
|
473
473
|
* @example
|
|
474
474
|
* // Simple color
|
|
@@ -156,12 +156,12 @@ export declare function stripJsonEdgeGarbage(str: string): string;
|
|
|
156
156
|
* @returns The parsed JSON value typed as `T`, or the original parsed value with optional primitive conversion.
|
|
157
157
|
* - Returns `{}` if parsing fails, such as when the input is malformed or invalid JSON or passing single quoted string.
|
|
158
158
|
*
|
|
159
|
-
* - *Unlike {@link https://toolbox.
|
|
159
|
+
* - *Unlike {@link https://nhb-toolbox.vercel.app/docs/utilities/object/parseJsonToObject parseJsonToObject}, which ensures the root value is an object,
|
|
160
160
|
* this function returns any valid JSON structure such as arrays, strings, numbers, or objects.*
|
|
161
161
|
*
|
|
162
162
|
* This is useful when you're not sure of the root structure of the JSON, or when you expect something other than an object.
|
|
163
163
|
*
|
|
164
|
-
* @see {@link https://toolbox.
|
|
164
|
+
* @see {@link https://nhb-toolbox.vercel.app/docs/utilities/object/parseJsonToObject parseJsonToObject} for strict object-only parsing.
|
|
165
165
|
*/
|
|
166
166
|
export declare const parseJSON: <T = unknown>(value: string, parsePrimitives?: boolean) => T;
|
|
167
167
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - This class is useful for natural language processing tasks, such as chatbots, text analysis, or content generation systems requiring accurate verb conjugation.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
* For ready to use instance, please refer to {@link https://toolbox.
|
|
12
|
+
* For ready to use instance, please refer to {@link https://nhb-toolbox.vercel.app/docs/utilities/string/verbalizer verbalizer} instead.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* const myVerbalizer = new Verbalizer();
|
|
@@ -113,7 +113,7 @@ export declare class Verbalizer {
|
|
|
113
113
|
isBase(verb: string): boolean;
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Default shared instance of {@link https://toolbox.
|
|
116
|
+
* Default shared instance of {@link https://nhb-toolbox.vercel.app/docs/classes/Verbalizer Verbalizer}.
|
|
117
117
|
*
|
|
118
118
|
* - Use this when you don’t need multiple configurations.
|
|
119
119
|
* - It comes preloaded with standard conjugation rules and irregular verbs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.31.
|
|
3
|
+
"version": "4.31.5",
|
|
4
4
|
"description": "A versatile collection of smart, efficient, and reusable utility functions, classes and types for everyday development needs.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"type": "git",
|
|
21
21
|
"url": "git+https://github.com/nazmul-nhb/nhb-toolbox.git"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://toolbox.
|
|
23
|
+
"homepage": "https://nhb-toolbox.vercel.app",
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "Nazmul Hassan",
|
|
26
26
|
"email": "nazmulnhb@gmail.com",
|
|
27
|
-
"url": "https://nazmul-nhb.
|
|
27
|
+
"url": "https://nazmul-nhb.vercel.app"
|
|
28
28
|
},
|
|
29
29
|
"contributors": [
|
|
30
30
|
{
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
},
|
|
45
45
|
"license": "Apache-2.0",
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@biomejs/biome": "^2.5.
|
|
47
|
+
"@biomejs/biome": "^2.5.10",
|
|
48
48
|
"@types/jest": "^30.0.0",
|
|
49
|
-
"@types/node": "^26.
|
|
49
|
+
"@types/node": "^26.2.0",
|
|
50
50
|
"husky": "^9.1.7",
|
|
51
51
|
"jest": "^30.4.2",
|
|
52
|
-
"lint-staged": "^17.0
|
|
52
|
+
"lint-staged": "^17.3.0",
|
|
53
53
|
"nhb-scripts": "^1.9.2",
|
|
54
|
-
"ts-jest": "^29.4.
|
|
54
|
+
"ts-jest": "^29.4.12",
|
|
55
55
|
"typescript": "^7.0.2"
|
|
56
56
|
},
|
|
57
57
|
"keywords": [
|