bias-random 1.0.0 → 1.0.1
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/CHANGELOG.md +6 -0
- package/README.md +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -9,13 +9,13 @@ Generates biased random numbers with a customizable bias level, direction, and r
|
|
|
9
9
|
## 📦 Installation
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npm
|
|
12
|
+
npm i bias-random
|
|
13
13
|
|
|
14
14
|
# or
|
|
15
15
|
yarn add install bias-random
|
|
16
16
|
|
|
17
17
|
# or
|
|
18
|
-
pnpm
|
|
18
|
+
pnpm i bias-random
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## 🚀 Usage
|
|
@@ -28,8 +28,8 @@ import biasedRandom from "bias-random";
|
|
|
28
28
|
// -Bias level of 2
|
|
29
29
|
// -Range 0 to 1
|
|
30
30
|
// Average resulting value will be 1/3
|
|
31
|
-
const defaultResult =
|
|
31
|
+
const defaultResult = biasedRandom();
|
|
32
32
|
|
|
33
33
|
// Cutomize the parmeters (all parameters are optional, defaulting to the values above)
|
|
34
|
-
const customResult =
|
|
34
|
+
const customResult = biasedRandom({ upperBias: true, biasLevel: 4, min: 10, max: 1000 });
|
|
35
35
|
```
|
package/package.json
CHANGED