summaryrefslogtreecommitdiff
path: root/src/node_modules/chance/docs/basics/falsy.md
blob: 24222a466fbb53618bf7ad30fa6e6c2aaf5f9607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# falsy

```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 changed to better meet the needs:

```js
chance.falsy({ pool: [ NaN, undefined ] });
=> NaN
```