Skip to content

contains<T>

Checks whether the array includes a value, like Array.prototype.includes.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function contains(this: T[], target: T): boolean

Parameters:

Parameter Type Description
this T[]
target T The value to look for.

Returns: boolean — true when the array includes target.