time-to-botec

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

repl.txt (839B)


      1 
      2 {{alias}}( value, constructor )
      3     Tests whether a value has in its prototype chain a specified constructor as
      4     a prototype property.
      5 
      6     While the prototype of an `object` created using object literal notion is
      7     `undefined`, the function returns `true` when provided an `object` literal
      8     and the `Object` constructor. This maintains consistent behavior with the
      9     `instanceof` operator.
     10 
     11     Parameters
     12     ----------
     13     value: any
     14         Input value.
     15 
     16     constructor: Function
     17         Constructor.
     18 
     19     Returns
     20     -------
     21     bool: boolean
     22         Boolean indicating if a value is an instance of a provided constructor.
     23 
     24     Examples
     25     --------
     26     > var bool = {{alias}}( [], Array )
     27     true
     28     > bool = {{alias}}( {}, Object )
     29     true
     30     > bool = {{alias}}( null, Object )
     31     false
     32 
     33     See Also
     34     --------
     35