time-to-botec

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

repl.txt (1090B)


      1 
      2 {{alias}}( value )
      3     Returns a string value indicating a specification defined classification of
      4     an object.
      5 
      6     The function is *not* robust for ES2015+ environments. In ES2015+,
      7     `Symbol.toStringTag` allows overriding the default description of an object.
      8     While measures are taken to uncover the default description, such measures
      9     can be thwarted. While this function remains useful for type-checking, be
     10     aware that value impersonation is possible. Where possible, prefer functions
     11     tailored to checking for particular value types, as specialized functions
     12     are better equipped to address `Symbol.toStringTag`.
     13 
     14     Parameters
     15     ----------
     16     value: any
     17         Input value.
     18 
     19     Returns
     20     -------
     21     out: string
     22         String value indicating a specification defined classification of the
     23         input value.
     24 
     25     Examples
     26     --------
     27     > var str = {{alias}}( 'a' )
     28     '[object String]'
     29     > str = {{alias}}( 5 )
     30     '[object Number]'
     31     > function Beep(){};
     32     > str = {{alias}}( new Beep() )
     33     '[object Object]'
     34 
     35     See Also
     36     --------
     37