effect-io-ai

Package: effect
Module: Array

Array.fromRecord

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

Example

import { Array } from "effect"

const result = Array.fromRecord({ a: 1, b: 2, c: 3 })
console.log(result) // [["a", 1], ["b", 2], ["c", 3]]

Signature

declare const fromRecord: <K extends string, A>(self: Readonly<Record<K, A>>) => Array<[K, A]>

Source

Since v2.0.0