node-powertools
Advanced tools
Comparing version
{ | ||
"name": "node-powertools", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Powerful assistive functions for Node and Browser environments.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -49,8 +49,8 @@ <p align="center"> | ||
Generate a random number between two numbers `min` and `max`. You can use `options` to supply a sign or randomize the sign as well. If an array is supplied, a random element from the array is returned. | ||
The default `options.mode` is `gaussian` but you can also supply `uniform`. | ||
The default `options.mode` is `uniform` but you can also supply `gaussian` which will generate random values on a gaussian bell curve. | ||
```js | ||
powertools.random(0, 100, {mode: 'gaussian'}); // Output: 69 | ||
powertools.random(-100, 100, {mode: 'gaussian'}); // Output: -69 | ||
powertools.random(-100, 100, {mode: 'uniform'}); // Output: -69 | ||
powertools.random(['Apple', 'Orange', 'Pear']); // Output: Orange (random element) | ||
powertools.random(0, 100, {mode: 'uniform'}); // Possible output: 69 | ||
powertools.random(-100, 100, {mode: 'uniform'}); // Possible output: -69 | ||
powertools.random(-100, 100, {mode: 'gaussian'}); // Possible output: -69 | ||
powertools.random(['Apple', 'Orange', 'Pear']); // Possible output: Orange (random element) | ||
``` | ||
@@ -57,0 +57,0 @@ |
24014
0.39%