time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (705B)


      1 
      2 {{alias}}( value )
      3     Tests if a value is a value which translates to `true` when evaluated in a
      4     boolean context.
      5 
      6     Parameters
      7     ----------
      8     value: any
      9         Value to test.
     10 
     11     Returns
     12     -------
     13     bool: boolean
     14         Boolean indicating whether a value is truthy.
     15 
     16     Examples
     17     --------
     18      > var bool = {{alias}}( true )
     19     true
     20     > bool = {{alias}}( {} )
     21     true
     22     > bool = {{alias}}( [] )
     23     true
     24     > bool = {{alias}}( false )
     25     false
     26     > bool = {{alias}}( '' )
     27     false
     28     > bool = {{alias}}( 0 )
     29     false
     30     > bool = {{alias}}( null )
     31     false
     32     > bool = {{alias}}( void 0 )
     33     false
     34     > bool = {{alias}}( NaN )
     35     false
     36 
     37     See Also
     38     --------
     39