Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

isSubrecord

import { isSubrecord } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/record.ts";

Given an instance of Comparable for the values in a ReadonlyRecord return a curried function second => first => boolean that returns true when first is a subrecord of second.

@example
import * as R from "./record.ts";
import { ComparableNumber } from "./number.ts";
import { pipe } from "./fn.ts";

const first = { one: 1, two: 2 };
const second = { one: 1, two: 2, three: 3 };
const isSub = R.isSubrecord(ComparableNumber);

const result1 = pipe(
  first,
  isSub(second),
); // true
const result2 = pipe(
  second,
  isSub(first),
); // false
function isSubrecord<A>(S: Comparable<A>): (second: ReadonlyRecord<A>) => (first: ReadonlyRecord<A>) => boolean;
§
isSubrecord<A>(S: Comparable<A>): (second: ReadonlyRecord<A>) => (first: ReadonlyRecord<A>) => boolean
[src]

§Type Parameters

§Parameters

§Return Type

§
(second: ReadonlyRecord<A>) => (first: ReadonlyRecord<A>) => boolean
[src]