Skip to content

fx-flow v0.7.0 / pipe/lazy / keys

Function: keys()

keys<A>(args): Generator<Extract<keyof A, string>, void, unknown>

Returns an iterator of the own enumerable property names of object.

Type parameters

A extends Record<string, unknown>

Parameters

args: A

Returns

Generator<Extract<keyof A, string>, void, unknown>

Example

typescript
[...keys({ a: 1, b: "2", c: true })]
// ["a", "b", "c"]

More examples

Source

packages/core/src/pipe/lazy/keys.ts:14

Released under the MIT License.