Skip to main content

Function: truthy()

truthy(v): boolean

Defined in: src/producers/espn_basketball_box.ts:76

Python truthiness for JSON values (NaN is truthy in Python).

Parameters​

v​

unknown

Any JSON value.

Returns​

boolean

false for null / undefined / false / 0 / "" / [] / {}; true otherwise.

Example​

truthy([]); // false
truthy(NaN); // true (as in Python)