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 1.3.1 to 1.4.1

6

js/StaticUtils.js

@@ -234,2 +234,8 @@ export default class StaticUtils {

}
static verify(condition, errorMessage) {
if (!condition) {
throw new Error(errorMessage);
}
}
}

2

package.json
{
"name": "simple-common-utils",
"version": "1.3.1",
"version": "1.4.1",
"description": "A collection of utility classes.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,2 @@

This is a collection of utility classes used for JS development.
This is a collection of utility classes used for JS development.

@@ -232,2 +232,16 @@ 1. <a name="cusage"></a>[Usage](#usage)

- random()
Generates a random number using `Math.random()`.
StaticUtils.random(1.5, 2.5); // A random number between 1.5 and 2.5.
StaticUtils.random(10, 12, true); // An integer random number in the half-open range [10, 12).
StaticUtils.random(10, 12, true, true); // An integer random number in the closed-range [10, 12].
- verify(condition, errorMessage)
Evaluates the passed boolean `condition` and throws an error with the `errorMessage` text if `condition` is false.
### <a name="versionHistory"></a>[Version history](#cversionHistory)

@@ -237,2 +251,3 @@

-|-
v1.4.1|The method `StaticUtils.verify()` is added.
v1.2.1|`StaticUtils.colorNames` had `00` as alpha. Changed to `FF`.

@@ -243,2 +258,2 @@ v1.2.0|The parameter `symmetric` is added to `StaticUtils.round()` in a backwards-compatible way.

<br><br>
> Written with [StackEdit](https://stackedit.io/).
> Written with [StackEdit](https://stackedit.io/).
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