Skip to main content
Module

x/fun/mod.ts>refinement.isRecord

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 refinement.isRecord
import { refinement } from "https://deno.land/x/fun@v2.0.0-alpha.12/mod.ts";
const { isRecord } = refinement;

An instance of Refinement<unknown, Record<string, unknown>>.

Examples

Example 1

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

const result1 = R.isRecord(null); // false
const result2 = R.isRecord({});
// true, a variable is now typed as Record<string, unknown>

Parameters

a: unknown

Returns

a is Record<string, unknown>