Skip to main content

valuesOf

Callable

  • valuesOf<T>(obj: T): ValuesOf<T>

  • Returns an array of values of the enumerable properties of an object.

    Example

    valuesOf({foo: "bar"})
    // => ["bar"]

    valuesOf({})
    // => []

    Alternatives


    Type parameters

    • T: object | ArrayLike<unknown>

    Parameters

    • obj: T

      The object to get the values from.

    Returns ValuesOf<T>

    The values as an array.