nhb-toolbox 4.3.2 → 4.10.4
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/dist/cjs/array/basics.js +2 -1
- package/dist/cjs/date/Chronos.js +26 -6
- package/dist/cjs/number/convert.js +8 -4
- package/dist/dts/array/basics.d.ts +2 -1
- package/dist/dts/array/basics.d.ts.map +1 -1
- package/dist/dts/date/Chronos.d.ts +20 -6
- package/dist/dts/date/Chronos.d.ts.map +1 -1
- package/dist/dts/number/convert.d.ts +3 -2
- package/dist/dts/number/convert.d.ts.map +1 -1
- package/dist/esm/array/basics.js +2 -1
- package/dist/esm/date/Chronos.js +26 -6
- package/dist/esm/number/convert.js +8 -4
- package/package.json +1 -1
package/dist/cjs/array/basics.js
CHANGED
|
@@ -17,8 +17,9 @@ const flattenArray = (input) => {
|
|
|
17
17
|
};
|
|
18
18
|
exports.flattenArray = flattenArray;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* @deprecated _Please, use `findAll` instance method from `Finder` class for **more advanced filtering and searching.**_
|
|
21
21
|
*
|
|
22
|
+
* * Filters an array of objects based on multiple conditions for specified keys.
|
|
22
23
|
* @param array - The array of objects to filter.
|
|
23
24
|
* @param conditions - An object where keys represent the property names and values represent filter conditions.
|
|
24
25
|
* The conditions can be a function `(value: T[K]) => boolean`.
|
package/dist/cjs/date/Chronos.js
CHANGED
|
@@ -522,7 +522,7 @@ class Chronos {
|
|
|
522
522
|
* @instance Checks if another date is the same as this one in a specific unit.
|
|
523
523
|
* @param other The other date to compare.
|
|
524
524
|
* @param unit The unit to compare.
|
|
525
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
525
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
526
526
|
*/
|
|
527
527
|
isSame(other, unit, weekStartsOn = 0) {
|
|
528
528
|
const time = new Chronos(other);
|
|
@@ -532,8 +532,8 @@ class Chronos {
|
|
|
532
532
|
/**
|
|
533
533
|
* @instance Checks if this date is before another date in a specific unit.
|
|
534
534
|
* @param other The other date to compare.
|
|
535
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
536
535
|
* @param unit The unit to compare.
|
|
536
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
537
537
|
*/
|
|
538
538
|
isBefore(other, unit, weekStartsOn = 0) {
|
|
539
539
|
const time = new Chronos(other);
|
|
@@ -544,13 +544,33 @@ class Chronos {
|
|
|
544
544
|
* @instance Checks if this date is after another date in a specific unit.
|
|
545
545
|
* @param other The other date to compare.
|
|
546
546
|
* @param unit The unit to compare.
|
|
547
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
547
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
548
548
|
*/
|
|
549
549
|
isAfter(other, unit, weekStartsOn = 0) {
|
|
550
550
|
const time = new Chronos(other);
|
|
551
551
|
return (this.startOf(unit, weekStartsOn).toDate().getTime() >
|
|
552
552
|
time.startOf(unit, weekStartsOn).toDate().getTime());
|
|
553
553
|
}
|
|
554
|
+
/**
|
|
555
|
+
* @instance Checks if this date is the same or before another date in a specific unit.
|
|
556
|
+
* @param other The other date to compare.
|
|
557
|
+
* @param unit The unit to compare.
|
|
558
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
559
|
+
*/
|
|
560
|
+
isSameOrBefore(other, unit, weekStartsOn = 0) {
|
|
561
|
+
return (this.isSame(other, unit, weekStartsOn) ||
|
|
562
|
+
this.isBefore(other, unit, weekStartsOn));
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* @instance Checks if this date is the same or after another date in a specific unit.
|
|
566
|
+
* @param other The other date to compare.
|
|
567
|
+
* @param unit The unit to compare.
|
|
568
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
569
|
+
*/
|
|
570
|
+
isSameOrAfter(other, unit, weekStartsOn = 0) {
|
|
571
|
+
return (this.isSame(other, unit, weekStartsOn) ||
|
|
572
|
+
this.isAfter(other, unit, weekStartsOn));
|
|
573
|
+
}
|
|
554
574
|
/**
|
|
555
575
|
* @instance Checks if the current date is between the given start and end dates.
|
|
556
576
|
*
|
|
@@ -996,7 +1016,7 @@ class Chronos {
|
|
|
996
1016
|
/**
|
|
997
1017
|
* @instance Returns a new Chronos instance at the start of a given unit.
|
|
998
1018
|
* @param unit The unit to reset (e.g., year, month, day).
|
|
999
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
1019
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
1000
1020
|
*/
|
|
1001
1021
|
startOf(unit, weekStartsOn = 0) {
|
|
1002
1022
|
const d = new Date(this.#date);
|
|
@@ -1036,7 +1056,7 @@ class Chronos {
|
|
|
1036
1056
|
/**
|
|
1037
1057
|
* @instance Returns a new Chronos instance at the end of a given unit.
|
|
1038
1058
|
* @param unit The unit to adjust (e.g., year, month, day).
|
|
1039
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
1059
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
1040
1060
|
*/
|
|
1041
1061
|
endOf(unit, weekStartsOn = 0) {
|
|
1042
1062
|
return this.startOf(unit, weekStartsOn)
|
|
@@ -1263,7 +1283,7 @@ class Chronos {
|
|
|
1263
1283
|
}
|
|
1264
1284
|
/**
|
|
1265
1285
|
* @instance Calculates the week number of the year based on custom week start.
|
|
1266
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
1286
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
1267
1287
|
* @returns Week number (1-53).
|
|
1268
1288
|
*/
|
|
1269
1289
|
getWeekOfYear(weekStartsOn = 0) {
|
|
@@ -5,13 +5,17 @@ exports.numberToWords = numberToWords;
|
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
6
|
const helpers_1 = require("./helpers");
|
|
7
7
|
/**
|
|
8
|
-
* * Converts a
|
|
9
|
-
* @
|
|
8
|
+
* * Converts a numeric value into its corresponding English word representation.
|
|
9
|
+
* @warning ***Supports numeric values up to `10e19` or `10^20` (one hundred quintillion).***
|
|
10
|
+
* @warning ***Decimal values are ignored; only the integer part is converted.***
|
|
10
11
|
* @param number - The number to convert into words.
|
|
11
12
|
* @returns The number converted in words.
|
|
12
13
|
*/
|
|
13
14
|
function numberToWords(num) {
|
|
14
|
-
let number = Number(num);
|
|
15
|
+
let number = Math.trunc(Number(num));
|
|
16
|
+
if (!Number.isFinite(number) || isNaN(number)) {
|
|
17
|
+
return 'Invalid Number!';
|
|
18
|
+
}
|
|
15
19
|
const isNegative = number < 0;
|
|
16
20
|
if (number === 0)
|
|
17
21
|
return 'zero';
|
|
@@ -20,7 +24,7 @@ function numberToWords(num) {
|
|
|
20
24
|
let result = '';
|
|
21
25
|
while (number > 0) {
|
|
22
26
|
if (i >= constants_1.thousands.length) {
|
|
23
|
-
return `Number exceeds supported range (max is
|
|
27
|
+
return `Number exceeds supported range (max is 10e19 aka 10^20)`;
|
|
24
28
|
}
|
|
25
29
|
if (number % 1000 !== 0) {
|
|
26
30
|
const isLastGroup = i === 0 && number % 100 < 100;
|
|
@@ -8,8 +8,9 @@ import type { Flattened } from './types';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const flattenArray: <T>(input: T | T[]) => Flattened<T>[];
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* @deprecated _Please, use `findAll` instance method from `Finder` class for **more advanced filtering and searching.**_
|
|
12
12
|
*
|
|
13
|
+
* * Filters an array of objects based on multiple conditions for specified keys.
|
|
13
14
|
* @param array - The array of objects to filter.
|
|
14
15
|
* @param conditions - An object where keys represent the property names and values represent filter conditions.
|
|
15
16
|
* The conditions can be a function `(value: T[K]) => boolean`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basics.d.ts","sourceRoot":"","sources":["../../../src/array/basics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,KAAG,SAAS,CAAC,CAAC,CAAC,EAO5D,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"basics.d.ts","sourceRoot":"","sources":["../../../src/array/basics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,KAAG,SAAS,CAAC,CAAC,CAAC,EAO5D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,aAAa,SACpD,CAAC,EAAE,cACE,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,OAAO,GAAE,KACnE,CAAC,EAeH,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,CAAC,KAAG,OAWnD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,CAAC,EAAE,KAAG,CAAC,EAW7C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,CAAC,EAAE,KAAG,CAAC,GAAG,SAEvD,CAAC"}
|
|
@@ -244,23 +244,37 @@ export declare class Chronos {
|
|
|
244
244
|
* @instance Checks if another date is the same as this one in a specific unit.
|
|
245
245
|
* @param other The other date to compare.
|
|
246
246
|
* @param unit The unit to compare.
|
|
247
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
247
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
248
248
|
*/
|
|
249
249
|
isSame(other: ChronosInput, unit: TimeUnit, weekStartsOn?: number): boolean;
|
|
250
250
|
/**
|
|
251
251
|
* @instance Checks if this date is before another date in a specific unit.
|
|
252
252
|
* @param other The other date to compare.
|
|
253
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
254
253
|
* @param unit The unit to compare.
|
|
254
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
255
255
|
*/
|
|
256
256
|
isBefore(other: ChronosInput, unit: TimeUnit, weekStartsOn?: number): boolean;
|
|
257
257
|
/**
|
|
258
258
|
* @instance Checks if this date is after another date in a specific unit.
|
|
259
259
|
* @param other The other date to compare.
|
|
260
260
|
* @param unit The unit to compare.
|
|
261
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
261
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
262
262
|
*/
|
|
263
263
|
isAfter(other: ChronosInput, unit: TimeUnit, weekStartsOn?: number): boolean;
|
|
264
|
+
/**
|
|
265
|
+
* @instance Checks if this date is the same or before another date in a specific unit.
|
|
266
|
+
* @param other The other date to compare.
|
|
267
|
+
* @param unit The unit to compare.
|
|
268
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
269
|
+
*/
|
|
270
|
+
isSameOrBefore(other: ChronosInput, unit: TimeUnit, weekStartsOn?: number): boolean;
|
|
271
|
+
/**
|
|
272
|
+
* @instance Checks if this date is the same or after another date in a specific unit.
|
|
273
|
+
* @param other The other date to compare.
|
|
274
|
+
* @param unit The unit to compare.
|
|
275
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
276
|
+
*/
|
|
277
|
+
isSameOrAfter(other: ChronosInput, unit: TimeUnit, weekStartsOn?: number): boolean;
|
|
264
278
|
/**
|
|
265
279
|
* @instance Checks if the current date is between the given start and end dates.
|
|
266
280
|
*
|
|
@@ -474,13 +488,13 @@ export declare class Chronos {
|
|
|
474
488
|
/**
|
|
475
489
|
* @instance Returns a new Chronos instance at the start of a given unit.
|
|
476
490
|
* @param unit The unit to reset (e.g., year, month, day).
|
|
477
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
491
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
478
492
|
*/
|
|
479
493
|
startOf(unit: TimeUnit, weekStartsOn?: number): Chronos;
|
|
480
494
|
/**
|
|
481
495
|
* @instance Returns a new Chronos instance at the end of a given unit.
|
|
482
496
|
* @param unit The unit to adjust (e.g., year, month, day).
|
|
483
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
497
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
484
498
|
*/
|
|
485
499
|
endOf(unit: TimeUnit, weekStartsOn?: number): Chronos;
|
|
486
500
|
/**
|
|
@@ -537,7 +551,7 @@ export declare class Chronos {
|
|
|
537
551
|
getWeek(): number;
|
|
538
552
|
/**
|
|
539
553
|
* @instance Calculates the week number of the year based on custom week start.
|
|
540
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
554
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
541
555
|
* @returns Week number (1-53).
|
|
542
556
|
*/
|
|
543
557
|
getWeekOfYear(weekStartsOn?: number): number;
|
|
@@ -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,KAAK,EAAE,IAAI;IAEvB;;;;;;OAMG;gBACS,KAAK,EAAE,OAAO;IAE1B;;;;;;;;;;;;OAYG;gBAEF,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,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@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Numeric } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* * Converts a
|
|
4
|
-
* @
|
|
3
|
+
* * Converts a numeric value into its corresponding English word representation.
|
|
4
|
+
* @warning ***Supports numeric values up to `10e19` or `10^20` (one hundred quintillion).***
|
|
5
|
+
* @warning ***Decimal values are ignored; only the integer part is converted.***
|
|
5
6
|
* @param number - The number to convert into words.
|
|
6
7
|
* @returns The number converted in words.
|
|
7
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/number/convert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/number/convert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxC;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAoClD;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QAAS,OAAO,KAAG,MA8BrD,CAAC"}
|
package/dist/esm/array/basics.js
CHANGED
|
@@ -13,8 +13,9 @@ export const flattenArray = (input) => {
|
|
|
13
13
|
}, []);
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* @deprecated _Please, use `findAll` instance method from `Finder` class for **more advanced filtering and searching.**_
|
|
17
17
|
*
|
|
18
|
+
* * Filters an array of objects based on multiple conditions for specified keys.
|
|
18
19
|
* @param array - The array of objects to filter.
|
|
19
20
|
* @param conditions - An object where keys represent the property names and values represent filter conditions.
|
|
20
21
|
* The conditions can be a function `(value: T[K]) => boolean`.
|
package/dist/esm/date/Chronos.js
CHANGED
|
@@ -519,7 +519,7 @@ export class Chronos {
|
|
|
519
519
|
* @instance Checks if another date is the same as this one in a specific unit.
|
|
520
520
|
* @param other The other date to compare.
|
|
521
521
|
* @param unit The unit to compare.
|
|
522
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
522
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
523
523
|
*/
|
|
524
524
|
isSame(other, unit, weekStartsOn = 0) {
|
|
525
525
|
const time = new Chronos(other);
|
|
@@ -529,8 +529,8 @@ export class Chronos {
|
|
|
529
529
|
/**
|
|
530
530
|
* @instance Checks if this date is before another date in a specific unit.
|
|
531
531
|
* @param other The other date to compare.
|
|
532
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
533
532
|
* @param unit The unit to compare.
|
|
533
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
534
534
|
*/
|
|
535
535
|
isBefore(other, unit, weekStartsOn = 0) {
|
|
536
536
|
const time = new Chronos(other);
|
|
@@ -541,13 +541,33 @@ export class Chronos {
|
|
|
541
541
|
* @instance Checks if this date is after another date in a specific unit.
|
|
542
542
|
* @param other The other date to compare.
|
|
543
543
|
* @param unit The unit to compare.
|
|
544
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
544
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
545
545
|
*/
|
|
546
546
|
isAfter(other, unit, weekStartsOn = 0) {
|
|
547
547
|
const time = new Chronos(other);
|
|
548
548
|
return (this.startOf(unit, weekStartsOn).toDate().getTime() >
|
|
549
549
|
time.startOf(unit, weekStartsOn).toDate().getTime());
|
|
550
550
|
}
|
|
551
|
+
/**
|
|
552
|
+
* @instance Checks if this date is the same or before another date in a specific unit.
|
|
553
|
+
* @param other The other date to compare.
|
|
554
|
+
* @param unit The unit to compare.
|
|
555
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
556
|
+
*/
|
|
557
|
+
isSameOrBefore(other, unit, weekStartsOn = 0) {
|
|
558
|
+
return (this.isSame(other, unit, weekStartsOn) ||
|
|
559
|
+
this.isBefore(other, unit, weekStartsOn));
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* @instance Checks if this date is the same or after another date in a specific unit.
|
|
563
|
+
* @param other The other date to compare.
|
|
564
|
+
* @param unit The unit to compare.
|
|
565
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
566
|
+
*/
|
|
567
|
+
isSameOrAfter(other, unit, weekStartsOn = 0) {
|
|
568
|
+
return (this.isSame(other, unit, weekStartsOn) ||
|
|
569
|
+
this.isAfter(other, unit, weekStartsOn));
|
|
570
|
+
}
|
|
551
571
|
/**
|
|
552
572
|
* @instance Checks if the current date is between the given start and end dates.
|
|
553
573
|
*
|
|
@@ -993,7 +1013,7 @@ export class Chronos {
|
|
|
993
1013
|
/**
|
|
994
1014
|
* @instance Returns a new Chronos instance at the start of a given unit.
|
|
995
1015
|
* @param unit The unit to reset (e.g., year, month, day).
|
|
996
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
1016
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
997
1017
|
*/
|
|
998
1018
|
startOf(unit, weekStartsOn = 0) {
|
|
999
1019
|
const d = new Date(this.#date);
|
|
@@ -1033,7 +1053,7 @@ export class Chronos {
|
|
|
1033
1053
|
/**
|
|
1034
1054
|
* @instance Returns a new Chronos instance at the end of a given unit.
|
|
1035
1055
|
* @param unit The unit to adjust (e.g., year, month, day).
|
|
1036
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
1056
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
1037
1057
|
*/
|
|
1038
1058
|
endOf(unit, weekStartsOn = 0) {
|
|
1039
1059
|
return this.startOf(unit, weekStartsOn)
|
|
@@ -1260,7 +1280,7 @@ export class Chronos {
|
|
|
1260
1280
|
}
|
|
1261
1281
|
/**
|
|
1262
1282
|
* @instance Calculates the week number of the year based on custom week start.
|
|
1263
|
-
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Default is `0`.
|
|
1283
|
+
* @param weekStartsOn Optional: Day the week starts on (0 = Sunday, 1 = Monday). Applicable if week day is required. Default is `0`.
|
|
1264
1284
|
* @returns Week number (1-53).
|
|
1265
1285
|
*/
|
|
1266
1286
|
getWeekOfYear(weekStartsOn = 0) {
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { thousands } from './constants';
|
|
2
2
|
import { _convertLessThanThousand } from './helpers';
|
|
3
3
|
/**
|
|
4
|
-
* * Converts a
|
|
5
|
-
* @
|
|
4
|
+
* * Converts a numeric value into its corresponding English word representation.
|
|
5
|
+
* @warning ***Supports numeric values up to `10e19` or `10^20` (one hundred quintillion).***
|
|
6
|
+
* @warning ***Decimal values are ignored; only the integer part is converted.***
|
|
6
7
|
* @param number - The number to convert into words.
|
|
7
8
|
* @returns The number converted in words.
|
|
8
9
|
*/
|
|
9
10
|
export function numberToWords(num) {
|
|
10
|
-
let number = Number(num);
|
|
11
|
+
let number = Math.trunc(Number(num));
|
|
12
|
+
if (!Number.isFinite(number) || isNaN(number)) {
|
|
13
|
+
return 'Invalid Number!';
|
|
14
|
+
}
|
|
11
15
|
const isNegative = number < 0;
|
|
12
16
|
if (number === 0)
|
|
13
17
|
return 'zero';
|
|
@@ -16,7 +20,7 @@ export function numberToWords(num) {
|
|
|
16
20
|
let result = '';
|
|
17
21
|
while (number > 0) {
|
|
18
22
|
if (i >= thousands.length) {
|
|
19
|
-
return `Number exceeds supported range (max is
|
|
23
|
+
return `Number exceeds supported range (max is 10e19 aka 10^20)`;
|
|
20
24
|
}
|
|
21
25
|
if (number % 1000 !== 0) {
|
|
22
26
|
const isLastGroup = i === 0 && number % 100 < 100;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.4",
|
|
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",
|