time-to-botec

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

repl.txt (535B)


      1 
      2 {{alias}}( obj, prop, setter )
      3     Defines a write-only accessor.
      4 
      5     Write-only accessors are enumerable and non-configurable.
      6 
      7     Parameters
      8     ----------
      9     obj: Object
     10         Object on which to define the property.
     11 
     12     prop: string|symbol
     13         Property name.
     14 
     15     setter: Function
     16         Set accessor.
     17 
     18     Examples
     19     --------
     20     > var obj = {};
     21     > var val = '';
     22     > function setter( v ) { val = v; };
     23     > {{alias}}( obj, 'foo', setter );
     24     > obj.foo = 'bar';
     25     > val
     26     'bar'
     27 
     28     See Also
     29     --------
     30