simple-common-utils
Advanced tools
Comparing version 2.5.1 to 2.6.0
@@ -207,2 +207,14 @@ export default class StaticUtils { | ||
static getRandomColor() { | ||
const hexDigits = "0123456789ABCDEF"; | ||
const result = []; | ||
for (let i = 0; i < 6; i++) { | ||
result.push(hexDigits[StaticUtils.random(0, hexDigits.length, true)]); | ||
} | ||
return `#${result.join("")}`; | ||
} | ||
static objectToArray(object) { | ||
@@ -209,0 +221,0 @@ return Object.keys(object).reduce((p, c) => { |
@@ -21,3 +21,3 @@ { | ||
}, | ||
"version": "2.5.1" | ||
"version": "2.6.0" | ||
} |
@@ -187,2 +187,6 @@ This is a collection of utility classes used for JS development. | ||
- getRandomColor() | ||
Returns a random color in the form "#RRGGBB". | ||
- objectToArray() | ||
@@ -258,2 +262,3 @@ | ||
-|- | ||
v2.6.0|`StaticUtils.getRandomColor()` added. | ||
v2.5.1|`StaticUtils.formatError()`: fallback added. | ||
@@ -260,0 +265,0 @@ v2.5.0|`StaticUtils.formatError()` added. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36468
721
281