Skip to main content
Module

x/fun/record.ts>keys

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

An alias of Object.keys specific to ReadonlyRecord.

Examples

Example 1

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

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

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

Returns

ReadonlyArray<string>