Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/record.ts>entries

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function entries
import { entries } from "https://deno.land/x/fun@v2.0.0/record.ts";

An alias of Object.entries

Examples

Example 1

import * as R from "./record.ts";

const data: R.ReadonlyRecord<string> = {
  hello: "world",
  foo: "bar",
};

// [["hello", "world"], ["foo", "bar"]]
const result1 = R.entries(data);
const result2 = R.entries({}); // []

Returns

ReadonlyArray<[string, A]>