time-to-botec

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

repl.txt (797B)


      1 
      2 {{alias}}( obj )
      3     Returns an array of an object's own and inherited enumerable property
      4     `[key, value]` pairs.
      5 
      6     Entry order is not guaranteed, as object key enumeration is not specified
      7     according to the ECMAScript specification. In practice, however, most
      8     engines use insertion order to sort an object's keys, thus allowing for
      9     deterministic return values.
     10 
     11     Parameters
     12     ----------
     13     obj: ObjectLike
     14         Input object.
     15 
     16     Returns
     17     -------
     18     arr: Array
     19         Array containing key-value pairs.
     20 
     21     Examples
     22     --------
     23     > function Foo() { this.beep = 'boop'; return this; };
     24     > Foo.prototype.foo = 'bar';
     25     > var obj = new Foo();
     26     > var entries = {{alias}}( obj )
     27     e.g., [ [ 'beep', 'boop' ], [ 'foo', 'bar' ] ]
     28 
     29     See Also
     30     --------
     31