ohzi-core 9.1.0 → 9.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ohzi-core",
3
- "version": "9.1.0",
3
+ "version": "9.2.0",
4
4
  "description": "OHZI Core Library",
5
5
  "source": "src/index.js",
6
6
  "module": "build/index.module.js",
@@ -3,6 +3,20 @@ class StringUtilities
3
3
  constructor()
4
4
  {}
5
5
 
6
+ static get_random_color()
7
+ {
8
+ const hexValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F'];
9
+ let hex = '#';
10
+
11
+ for (let i = 0; i < 6; i++)
12
+ {
13
+ const index = Math.floor(Math.random() * hexValues.length);
14
+ hex += hexValues[index];
15
+ }
16
+
17
+ return hex;
18
+ }
19
+
6
20
  static capitalize(string)
7
21
  {
8
22
  const words = string.split(' ');
@@ -1,4 +1,5 @@
1
1
  export class StringUtilities {
2
+ static get_random_color(): string;
2
3
  static capitalize(string: any): any;
3
4
  static capitalize_first_letter(string: any): any;
4
5
  static snake_to_camelcase(string: any): any;