Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/entries/docs/types/index.d"

Index

Type aliases

Functions

Type aliases

KeyValuePair

KeyValuePair: [string, any]

Two-element array holding a key and corresponding value.

Functions

Export assignment objectEntries

  • Returns an array of an object's own enumerable property [key, value] pairs.

    Notes

    • Entry order is not guaranteed, as object key enumeration is not specified according to the ECMAScript specification. In practice, however, most engines use insertion order to sort an object's keys, thus allowing for deterministic return values.

    Parameters

    • obj: any

      input object

    Returns Array < KeyValuePair >

    array containing key-value pairs

    Example

    var obj = {
        'beep': 'boop',
        'foo': 'bar'
    };
    
    var entries = objectEntries( obj );
    // e.g., returns [ ['beep', 'boop'], ['foo', 'bar'] ]