time-to-botec

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

repl.txt (496B)


      1 
      2 {{alias}}( obj, prop, getter )
      3     Defines a read-only accessor.
      4 
      5     Read-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     getter: Function
     16         Get accessor.
     17 
     18     Examples
     19     --------
     20     > var obj = {};
     21     > function getter() { return 'bar'; };
     22     > {{alias}}( obj, 'foo', getter );
     23     > obj.foo
     24     'bar'
     25 
     26     See Also
     27     --------
     28