Skip to main content
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.
Go to Latest
function entries
import { entries } from "https://deno.land/x/fun@v2.0.0-alpha.10/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]>