nhb-toolbox 4.27.0 → 4.27.1
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
CHANGED
|
@@ -6,6 +6,10 @@ All notable changes to the package will be documented here.
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [4.27.1] - 2025-11-28
|
|
10
|
+
|
|
11
|
+
- **Updated** default *type parameter* for `generateRandomColor` by replacing `undefined` with `'hex'`.
|
|
12
|
+
|
|
9
13
|
## [4.27.0] - 2025-11-28
|
|
10
14
|
|
|
11
15
|
### New
|
|
@@ -19,6 +23,7 @@ All notable changes to the package will be documented here.
|
|
|
19
23
|
### Updates
|
|
20
24
|
|
|
21
25
|
- **Updated** `convertStringCase` utility to accept new format: `'Sentence case'`.
|
|
26
|
+
- **Updated** `generateAnagram` utility to accept an *optional dictionary array* for generating **valid anagrams**.
|
|
22
27
|
- **Updated** `isUUID` to verify versions 1-8 (not just `v4`). It now *narrows down* the value to **branded type** `UUID<UUIDVersion>`.
|
|
23
28
|
|
|
24
29
|
## [4.26.74] - 2025-11-23
|
|
@@ -40,4 +40,4 @@ export declare const generateRandomColorInHexRGB: (maxColors?: number) => Random
|
|
|
40
40
|
* const hsl = generateRandomColor({ colorType: 'hsl', maxColors: 32 });
|
|
41
41
|
* // hsl value with inferred type: HSL, with a larger unique color memory pool
|
|
42
42
|
*/
|
|
43
|
-
export declare function generateRandomColor<C extends $ColorType
|
|
43
|
+
export declare function generateRandomColor<C extends $ColorType = 'hex'>(options?: RandomColorOptions<C>): RandomColor<C>;
|
|
@@ -58,9 +58,9 @@ export type RandomHexRGB = {
|
|
|
58
58
|
/** Basic color type: `hex`, `rgb` or `hsl`. */
|
|
59
59
|
export type $ColorType = 'hex' | 'rgb' | 'hsl';
|
|
60
60
|
/** Options for random color generation. */
|
|
61
|
-
export interface RandomColorOptions<C extends $ColorType
|
|
61
|
+
export interface RandomColorOptions<C extends $ColorType> {
|
|
62
62
|
/** The type of expected return type of color: `hex`, `rgb` or `hsl`. Default is `'hex'`. */
|
|
63
|
-
colorType?: C;
|
|
63
|
+
colorType?: C | $ColorType;
|
|
64
64
|
/** The maximum number of recent colors to store in memory. Default is `16`. */
|
|
65
65
|
maxColors?: number;
|
|
66
66
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhb-toolbox",
|
|
3
|
-
"version": "4.27.
|
|
3
|
+
"version": "4.27.1",
|
|
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",
|