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

324 B

falsy

// usages
chance.falsy()
chance.falsy({ pool: [ NaN, undefined ] })

Return a random falsy value (false, null, undefined, 0, NaN, '').

chance.falsy();
=> false

The default pool can be changed to better meet the needs:

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