Skip to content

assertcheck v1.0.0


assertcheck / assert / subset

Function: subset() ​

ts
function subset<T>(
   arr, 
   sub, 
   opts?): void;

Defined in: src/assert.ts:1084

Asserts that all elements of sub are present in arr.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
arrT[]
subT[]
opts?Opts

Returns ​

void

Example ​

ts
`assert.subset(arr, required, "some required elements are missing")`

Released under the Apache 2.0 License. Built by Vagabond Studio — senior-only for growing companies.