Socket
Socket
Sign inDemoInstall

simple-common-utils

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-common-utils - npm Package Compare versions

Comparing version 2.5.1 to 2.6.0

12

js/StaticUtils.js

@@ -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) => {

2

package.json

@@ -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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc