# isBoolean > Test if a value is a boolean.
### Usage ```javascript var isBoolean = require( '@stdlib/assert/is-boolean' ); ``` #### isBoolean( value ) Tests if a `value` is a `boolean`. ```javascript var bool = isBoolean( false ); // returns true bool = isBoolean( true ); // returns true bool = isBoolean( new Boolean( false ) ); // returns true bool = isBoolean( new Boolean( true ) ); // returns true ``` #### isBoolean.isPrimitive( value ) Tests if a `value` is a primitive `boolean`. ```javascript var bool = isBoolean.isPrimitive( true ); // returns true bool = isBoolean.isPrimitive( false ); // returns true bool = isBoolean.isPrimitive( new Boolean( true ) ); // returns false ``` #### isBoolean.isObject( value ) Tests if a `value` is a `Boolean` object. ```javascript var bool = isBoolean.isObject( true ); // returns false bool = isBoolean.isObject( new Boolean( false ) ); // returns true ```
### Examples ```javascript var isBoolean = require( '@stdlib/assert/is-boolean' ); var bool = isBoolean( false ); // returns true bool = isBoolean( new Boolean( false ) ); // returns true bool = isBoolean( 'true' ); // returns false bool = isBoolean( null ); // returns false ```