Skip to content

values

ts
function Object.values<T extends object>(
    target: T,
): AllUnionFields<T> extends infer U ? U[keyof U][] : never

Returns an array of target object's enumerable property values.

Example

ts
import { Object } from "@monstermann/object";

Object.values({ a: 1, b: 2, c: 3 }); // [1, 2, 3]
ts
import { Object } from "@monstermann/object";

pipe({ a: 1, b: 2, c: 3 }, Object.values()); // [1, 2, 3]