Files
SupportBot/node_modules/chance/docs/basics/falsy.md
T
2021-02-02 13:50:53 +00:00

23 lines
324 B
Markdown

# 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
```