Function values

Returns an array of the values of a given object.

values({ a: 1, b: 2, c: 3 }) // [1, 2, 3]
  • Type Parameters

    • V

      The type of the object values.

    Parameters

    • source: Record<PropertyKey, V>

      The object to extract the values from.

    Returns readonly V[]

    An array of the object values.