Skip to content

assertcheck v1.0.0


assertcheck / assert / includes

Function: includes() ​

ts
function includes<T>(
   arr, 
   item, 
   opts?): void;

Defined in: src/assert.ts:836

Asserts that the array contains the given item (using _.includes).

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
arrT[]
itemT
opts?Opts

Returns ​

void

Example ​

ts
`assert.includes(roles, "admin", "admin role required")`

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