• Returns an array of key/values of the enumerable properties of an object

    Type Parameters

    • T = any

    Parameters

    • value: {} | {
          [s: string]: T;
      } | ArrayLike<T>

      Object that contains the properties and methods.

    Returns [string, T][]

    Since

    0.9.7

    Example

    objEntries({ Hello: "Darkness", my: "old", friend: "." });
    // [ [ "Hello", "Darkness" ], [ "my", "old"], [ "friend", "." ] ]

    // Array-like object
    objEntries({ 0: "a", 1: "b", 2: "c" }));
    // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]

    // Array-like object with random key ordering
    objEntries({ 100: "a", 2: "b", 7: "c" });
    // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ]*