effect-io-ai

Package: effect
Module: Record

Record.toEntries

Takes a record and returns an array of tuples containing its keys and values.

Example

import * as assert from "node:assert"
import { toEntries } from "effect/Record"

const x = { a: 1, b: 2, c: 3 }
assert.deepStrictEqual(toEntries(x), [["a", 1], ["b", 2], ["c", 3]])

Signature

declare const toEntries: <K extends string, A>(self: ReadonlyRecord<K, A>) => Array<[K, A]>

Source

Since v2.0.0