Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dtils/deps.ts>asserts.assertObjectMatch

The best unofficial library of utilities for Deno applications
Go to Latest
function asserts.assertObjectMatch
import { asserts } from "https://deno.land/x/dtils@2.0.0/deps.ts";
const { assertObjectMatch } = asserts;

Make an assertion that actual object is a subset of expected object, deeply. If not, then throw.

Parameters

actual: Record<PropertyKey, any>
expected: Record<PropertyKey, unknown>
optional
msg: string