import { partial } from "https://deno.land/x/fun@v2.0.0-alpha.6/eq.ts";
Create a eq that compares, key for key, structs according to the structure of the eqs passed into struct. It allows the values in the struct to be optional or null.
Examples
Example 1
Example 1
import { struct, number, string } from "./eq.ts";
const { equals } = struct({ name: string, age: number });
const brandon = { name: "Brandon", age: 37 };
const emily = { name: "Emily", age: 32 };
const result1 = equals(brandon)(emily); // false
const result2 = equals(brandon)(brandon); // true