Add bool subcommand to random (#2061)

* Add bool subcommand to random

* Fix function name copy paste error

* Fix issue 2062: allow deserialization of a decimal

* Add bias flag to `random bool`
This commit is contained in:
Joseph T. Lyons
2020-06-26 00:51:05 -04:00
committed by GitHub
parent 80ce8acf57
commit 306dc89ede
9 changed files with 151 additions and 3 deletions

View File

@ -2,11 +2,33 @@
Use `random` to generate random values
## uuid
* `random uuid`: Generate a random uuid4 string
## Examples
### uuid Examples
```shell
> random uuid
8af4de39-acbc-42f0-94d1-7cfad6c01f8b
```
## bool
* `random bool`: Generate a random boolean value
### bool Flags
* `-b`, `--bias` \<number>: Adjusts the probability of a "true" outcome
### bool Examples
```shell
> random bool
false
```
```shell
> random bool --bias 0.75
true
```