nhb-toolbox 4.30.22 → 4.30.24
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 +4 -0
- package/README.md +2 -2
- package/dist/cjs/date/guards.js +1 -1
- package/dist/esm/date/guards.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
All notable changes to the package will be documented here.
|
|
6
6
|
|
|
7
|
+
## [4.30.20-24] - 2026-05-26
|
|
8
|
+
|
|
9
|
+
- **Updated** `isValidUTCOffset`: Strict matching of offset format `+HH:MM` or `-HH:MM` (00-14h, 00/15/30/45m).
|
|
10
|
+
|
|
7
11
|
## [4.30.20-22] - 2026-05-26
|
|
8
12
|
|
|
9
13
|
- **Fixed** token audience(s) validation issue in `Signet` class, previously it was returning `false` even for valid tokens.
|
package/README.md
CHANGED
|
@@ -286,10 +286,10 @@ const user = {
|
|
|
286
286
|
tags: [],
|
|
287
287
|
};
|
|
288
288
|
|
|
289
|
-
sanitizeData(user, {
|
|
289
|
+
sanitizeData(user, { ignoreFalsy: true, ignoreEmpty: true });
|
|
290
290
|
// Returns { name: "John Doe", address: { city: "NYC" } } with exact input type which may cause issue when accessing missing properties
|
|
291
291
|
|
|
292
|
-
sanitizeData(user, {
|
|
292
|
+
sanitizeData(user, { ignoreFalsy: true, ignoreEmpty: true }, 'partial');
|
|
293
293
|
// Return type: $DeepPartial<typeof user> safe property access by making all the properties (nested objects/arrays) optional
|
|
294
294
|
// Returns { name: "John Doe", address: { city: "NYC" } }
|
|
295
295
|
```
|
package/dist/cjs/date/guards.js
CHANGED
|
@@ -23,7 +23,7 @@ function isValidTime(value) {
|
|
|
23
23
|
return hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
|
|
24
24
|
}
|
|
25
25
|
function isValidUTCOffset(value) {
|
|
26
|
-
return (0, primitives_1.isString)(value) ? /^UTC[+-]
|
|
26
|
+
return (0, primitives_1.isString)(value) ? /^UTC[+-]?(?:0[0-9]|1[0-4]):(?:00|15|30|45)$/.test(value) : false;
|
|
27
27
|
}
|
|
28
28
|
function isValidTimeZoneId(value) {
|
|
29
29
|
return (0, primitives_1.isNonEmptyString)(value) ? new Set([...timezone_1.IANA_TZ_IDS]).has(value) : false;
|
package/dist/esm/date/guards.js
CHANGED
|
@@ -14,7 +14,7 @@ export function isValidTime(value) {
|
|
|
14
14
|
return hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59;
|
|
15
15
|
}
|
|
16
16
|
export function isValidUTCOffset(value) {
|
|
17
|
-
return isString(value) ? /^UTC[+-]
|
|
17
|
+
return isString(value) ? /^UTC[+-]?(?:0[0-9]|1[0-4]):(?:00|15|30|45)$/.test(value) : false;
|
|
18
18
|
}
|
|
19
19
|
export function isValidTimeZoneId(value) {
|
|
20
20
|
return isNonEmptyString(value) ? new Set([...IANA_TZ_IDS]).has(value) : false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.30.
|
|
3
|
+
"version": "4.30.24",
|
|
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",
|