Function objKeysArray

  • Returns an array of keys from the provided object.

    Type Parameters

    • V

    Parameters

    • obj: Record<ObjectKey, V>

      The object from which to extract the keys.

    Returns string[]

    The array of keys of the input object.

    Remarks

    This function is a part of Object Utilities.

    Typeparam

    V - The type of values in the object.

    Example

    const obj = { a: 1, b: 2, c: 3 };
    objKeysArray(obj);
    //=> ['a', 'b', 'c']

Generated using TypeDoc