You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
336 B
25 lines
336 B
4 weeks ago
|
# bool
|
||
|
|
||
|
```js
|
||
|
// usages
|
||
|
chance.falsy()
|
||
|
chance.falsy({ pool: [ NaN, undefined ] })
|
||
|
```
|
||
|
Return a random falsy value (`false`, `null`, `undefined`, `0`, `NaN`, `''`).
|
||
|
|
||
|
|
||
|
```js
|
||
|
chance.falsy();
|
||
|
=> false
|
||
|
```
|
||
|
|
||
|
The default pool can be change to better meet the needs:
|
||
|
|
||
|
|
||
|
```js
|
||
|
chance.falsy({ pool: [ NaN, undefined ] });
|
||
|
=> NaN
|
||
|
```
|
||
|
|
||
|
|