Function objKeys

  • Returns an iterable of all the keys in the given object.

    Type Parameters

    • V

    Parameters

    • obj: Record<ObjectKey, V>

      The object whose keys to iterate over.

    Returns Iterable<string>

    An iterable of the object's keys.

    Remarks

    This function is a part of the utils module.

    Typeparam

    V - The type of the values in the object.

    Example

    const obj = { a: 1, b: 2, c: 3 };
    const keys = objKeys(obj);
    for (const key of keys) {
    //=> //=> //=> c
    }

Generated using TypeDoc