Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

std/assert/equal.ts>equal

The Deno Standard Library
Latest
function equal
import { equal } from "https://deno.land/std@0.224.0/assert/equal.ts";

Deep equality comparison used in assertions

Examples

Example 1

import { equal } from "https://deno.land/std@0.224.0/assert/equal.ts";

equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
equal({ foo: "bar" }, { foo: "baz" }); // Returns `false

Parameters

c: unknown

actual value

d: unknown

expected value

Returns

boolean