# isTruthy > Test if a value is truthy.
## Usage ```javascript var isTruthy = require( '@stdlib/assert/is-truthy' ); ``` #### isTruthy( value ) Tests if a `value` is a value which translates to `true` when evaluated in a boolean context. ```javascript var bool = isTruthy( true ); // returns true bool = isTruthy( [] ); // returns true bool = isTruthy( false ); // returns false bool = isTruthy( '' ); // returns false bool = isTruthy( 0 ); // returns false bool = isTruthy( NaN ); // returns false bool = isTruthy( null ); // returns false bool = isTruthy( void 0 ); // returns false ```
## Examples ```javascript var isTruthy = require( '@stdlib/assert/is-truthy' ); var bool = isTruthy( true ); // returns true bool = isTruthy( 'beep' ); // returns true bool = isTruthy( 5 ); // returns true bool = isTruthy( [] ); // returns true bool = isTruthy( {} ); // returns true bool = isTruthy( function foo() {} ); // returns true bool = isTruthy( false ); // returns false bool = isTruthy( 0 ); // returns false bool = isTruthy( NaN ); // returns false bool = isTruthy( '' ); // returns false bool = isTruthy( void 0 ); // returns false bool = isTruthy( null ); // returns false ```