@stdlib/assert
Version:
Standard assertion utilities.
69 lines (52 loc) • 1.3 kB
Plain Text
{{alias}}( value )
Tests if a value is a boolean.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating whether value is a boolean.
Examples
--------
> var bool = {{alias}}( false )
true
> bool = {{alias}}( new {{alias:@stdlib/boolean/ctor}}( false ) )
true
{{alias}}.isPrimitive( value )
Tests if a value is a boolean primitive.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating whether value is a boolean primitive.
Examples
--------
> var bool = {{alias}}.isPrimitive( true )
true
> bool = {{alias}}.isPrimitive( false )
true
> bool = {{alias}}.isPrimitive( new {{alias:@stdlib/boolean/ctor}}( true ) )
false
{{alias}}.isObject( value )
Tests if a value is a boolean object.
Parameters
----------
value: any
Value to test.
Returns
-------
bool: boolean
Boolean indicating whether value is a boolean object.
Examples
--------
> var bool = {{alias}}.isObject( true )
false
> bool = {{alias}}.isObject( new {{alias:@stdlib/boolean/ctor}}( false ) )
true
See Also
--------