Skip to content

keys

ts
function Object.keys<T extends object>(target: T): KeysOfUnion<T>[]

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

Example

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

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

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