time-to-botec

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

repl.txt (824B)


      1 
      2 {{alias}}( source, prop, target )
      3     Moves a property from one object to another object.
      4 
      5     The property is deleted from the source object and the property's descriptor
      6     is preserved during transfer.
      7 
      8     If a source property is not configurable, the function throws an error, as
      9     the property cannot be deleted from the source object.
     10 
     11     Parameters
     12     ----------
     13     source: Object
     14         Source object.
     15 
     16     prop: string
     17         Property to move.
     18 
     19     target: Object
     20         Target object.
     21 
     22     Returns
     23     -------
     24     bool: boolean
     25         Boolean indicating whether operation was successful.
     26 
     27     Examples
     28     --------
     29     > var obj1 = { 'a': 'b' };
     30     > var obj2 = {};
     31     > var bool = {{alias}}( obj1, 'a', obj2 )
     32     true
     33     > bool = {{alias}}( obj1, 'c', obj2 )
     34     false
     35 
     36     See Also
     37     --------
     38